diff --git a/app/lib/activitypub/activity/like.rb b/app/lib/activitypub/activity/like.rb index 1087a6c8b02d77..86aaba076dd317 100644 --- a/app/lib/activitypub/activity/like.rb +++ b/app/lib/activitypub/activity/like.rb @@ -78,7 +78,7 @@ def relay_for_emoji_reaction end def relay_friend_for_emoji_reaction - return unless @json['signature'].present? && @original_status.public_visibility? + return unless @json['signature'].present? && @original_status.distributable_friend? ActivityPub::DeliveryWorker.push_bulk(FriendDomain.distributables.pluck(:inbox_url)) do |inbox_url| [Oj.dump(@json), @original_status.account.id, inbox_url] diff --git a/app/models/emoji_reaction.rb b/app/models/emoji_reaction.rb index ce0a7dfb2edb4d..5d6d58513cc92d 100644 --- a/app/models/emoji_reaction.rb +++ b/app/models/emoji_reaction.rb @@ -43,6 +43,10 @@ def remote_custom_emoji? custom_emoji? && !custom_emoji.local? end + def sign? + status&.distributable_friend? + end + private def refresh_cache diff --git a/app/models/status.rb b/app/models/status.rb index 26baac1b680d0d..4b718cdc928ef5 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -591,6 +591,10 @@ def unlink_from_conversations! end end + def distributable_friend? + public_visibility? || public_unlisted_visibility? || (unlisted_visibility? && (public_searchability? || public_unlisted_searchability?)) + end + private def update_status_stat!(attrs)