Reverse reply_to_local requirement to return false when no check tags

This commit is contained in:
KMY 2023-09-04 21:16:14 +09:00
parent cee5f845fa
commit aba7af8e59

View file

@ -421,11 +421,11 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
end
def reply_to_local_from_tags?
(@mentions.nil? || @mentions.any? { |m| m.account.local? })
(@mentions.present? && @mentions.any? { |m| m.account.local? })
end
def reply_to_local_from_tags_following?
(@mentions.nil? || @mentions.none? { |m| m.account.local? && !m.account.following?(@account) })
(@mentions.present? && @mentions.none? { |m| m.account.local? && !m.account.following?(@account) })
end
def reply_to_local?