Add Account#unavailable?
and Account#permanently_unavailable?
aliases (#28053)
This commit is contained in:
parent
35deaaf90b
commit
963354978a
25 changed files with 57 additions and 58 deletions
|
@ -50,7 +50,7 @@ class FollowService < BaseService
|
|||
end
|
||||
|
||||
def following_not_possible?
|
||||
@target_account.nil? || @target_account.id == @source_account.id || @target_account.suspended?
|
||||
@target_account.nil? || @target_account.id == @source_account.id || @target_account.unavailable?
|
||||
end
|
||||
|
||||
def following_not_allowed?
|
||||
|
|
|
@ -108,7 +108,7 @@ class NotifyService < BaseService
|
|||
end
|
||||
|
||||
def blocked?
|
||||
blocked = @recipient.suspended?
|
||||
blocked = @recipient.unavailable?
|
||||
blocked ||= from_self? && @notification.type != :poll
|
||||
|
||||
return blocked if message? && from_staff?
|
||||
|
|
|
@ -51,7 +51,7 @@ class ProcessMentionsService < BaseService
|
|||
|
||||
# If after resolving it still isn't found or isn't the right
|
||||
# protocol, then give up
|
||||
next match if mention_undeliverable?(mentioned_account) || mentioned_account&.suspended?
|
||||
next match if mention_undeliverable?(mentioned_account) || mentioned_account&.unavailable?
|
||||
|
||||
mention = @previous_mentions.find { |x| x.account_id == mentioned_account.id }
|
||||
mention ||= @current_mentions.find { |x| x.account_id == mentioned_account.id }
|
||||
|
|
|
@ -12,7 +12,7 @@ class ReportService < BaseService
|
|||
@rule_ids = options.delete(:rule_ids).presence
|
||||
@options = options
|
||||
|
||||
raise ActiveRecord::RecordNotFound if @target_account.suspended?
|
||||
raise ActiveRecord::RecordNotFound if @target_account.unavailable?
|
||||
|
||||
create_report!
|
||||
notify_staff!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue