#71 フレンドサーバーにスタンプを送信

This commit is contained in:
KMY 2023-10-10 19:52:36 +09:00
parent e16d8a00f3
commit db98ef8a44

View file

@ -57,6 +57,7 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
NotifyService.new.call(@original_status.account, :emoji_reaction, reaction)
forward_for_emoji_reaction
relay_for_emoji_reaction
relay_friend_for_emoji_reaction
end
rescue Seahorse::Client::NetworkingError
nil
@ -76,6 +77,14 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
end
end
def relay_friend_for_emoji_reaction
return unless @json['signature'].present? && @original_status.public_visibility?
ActivityPub::DeliveryWorker.push_bulk(FriendDomain.distributables.pluck(:inbox_url)) do |inbox_url|
[Oj.dump(@json), @original_status.account.id, inbox_url]
end
end
def shortcode
return @shortcode if defined?(@shortcode)