0
0
Fork 0

Fix inability to locally suspend remotely-suspended accounts in moderation interface (#31899)

This commit is contained in:
Claire 2024-09-13 11:11:10 +02:00 committed by GitHub
parent a2c4f5f5c0
commit ba81e4e019
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 38 additions and 5 deletions

View file

@ -259,6 +259,10 @@ class Account < ApplicationRecord
suspended_at.present? && !instance_actor?
end
def suspended_locally?
suspended? && suspension_origin_local?
end
def suspended_permanently?
suspended? && deletion_request.nil?
end

View file

@ -74,7 +74,7 @@ class Admin::AccountAction
end
def disabled_types_for_account(account)
if account.suspended?
if account.suspended_locally?
%w(silence suspend)
elsif account.silenced?
%w(silence)