1
0
Fork 0
forked from gitea/nas

Stop forwarding remote custom emoji reaction

This commit is contained in:
KMY 2023-09-07 12:47:45 +09:00
parent b802d1f1ac
commit 9aa4561252
2 changed files with 9 additions and 0 deletions

View file

@ -35,6 +35,14 @@ class EmojiReaction < ApplicationRecord
after_destroy :refresh_cache
after_destroy :invalidate_cleanup_info
def custom_emoji?
custom_emoji.present?
end
def remote_custom_emoji?
custom_emoji? && !custom_emoji.local?
end
private
def refresh_cache

View file

@ -57,6 +57,7 @@ class EmojiReactService < BaseService
status = emoji_reaction.status
return unless status.account.local?
return if emoji_reaction.remote_custom_emoji?
ActivityPub::RawDistributionWorker.perform_async(build_json(emoji_reaction), status.account_id)
end