diff options
author | Jenkins <jenkins@jenkins.ninjawedding.org> | 2018-04-14 09:17:23 +0000 |
---|---|---|
committer | Jenkins <jenkins@jenkins.ninjawedding.org> | 2018-04-14 09:17:23 +0000 |
commit | e3d0d72b299103d30fcda2b7175906c73c1571bc (patch) | |
tree | 055174de4a160b54181bdcaf4c8099ebe44a2a0c /app/validators | |
parent | d66192f21c22dd79735a6c3ea6e2ed115b42e0d0 (diff) | |
parent | 85ab30abf7f8da61d37e4711cba350877bfb6f2b (diff) |
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'app/validators')
-rw-r--r-- | app/validators/status_pin_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/status_pin_validator.rb b/app/validators/status_pin_validator.rb index 64da04120..2c7bce674 100644 --- a/app/validators/status_pin_validator.rb +++ b/app/validators/status_pin_validator.rb @@ -5,6 +5,6 @@ class StatusPinValidator < ActiveModel::Validator pin.errors.add(:base, I18n.t('statuses.pin_errors.reblog')) if pin.status.reblog? pin.errors.add(:base, I18n.t('statuses.pin_errors.ownership')) if pin.account_id != pin.status.account_id pin.errors.add(:base, I18n.t('statuses.pin_errors.private')) unless %w(public unlisted).include?(pin.status.visibility) - pin.errors.add(:base, I18n.t('statuses.pin_errors.limit')) if pin.account.status_pins.count > 4 + pin.errors.add(:base, I18n.t('statuses.pin_errors.limit')) if pin.account.status_pins.count > 4 && pin.account.local? end end |