Various code cleanup (#1782)
* Remove duplicate in_chosen_languages definition * Use `DEFAULT_FIELDS_SIZE` instead of `MAX_FIELDS` to reduce code differences with upstream * Remove duplicate annotation * Fix incorrect cross-flavor imports * Remove deprecated `hide_network` setting (replaced by account column) * Remove unused KeywordMutesHelper * Remove trailing spaces * Remove commit_hash from InstancePresenter, as it has been unused since mid-2017
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
class StatusPinValidator < ActiveModel::Validator
|
||||
MAX_PINNED = (ENV['MAX_PINNED_TOOTS'] || 5).to_i
|
||||
|
||||
|
||||
def validate(pin)
|
||||
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
|
||||
|
Reference in New Issue
Block a user