Stop forwarding remote custom emoji reaction
This commit is contained in:
parent
b802d1f1ac
commit
9aa4561252
2 changed files with 9 additions and 0 deletions
|
@ -35,6 +35,14 @@ class EmojiReaction < ApplicationRecord
|
||||||
after_destroy :refresh_cache
|
after_destroy :refresh_cache
|
||||||
after_destroy :invalidate_cleanup_info
|
after_destroy :invalidate_cleanup_info
|
||||||
|
|
||||||
|
def custom_emoji?
|
||||||
|
custom_emoji.present?
|
||||||
|
end
|
||||||
|
|
||||||
|
def remote_custom_emoji?
|
||||||
|
custom_emoji? && !custom_emoji.local?
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def refresh_cache
|
def refresh_cache
|
||||||
|
|
|
@ -57,6 +57,7 @@ class EmojiReactService < BaseService
|
||||||
status = emoji_reaction.status
|
status = emoji_reaction.status
|
||||||
|
|
||||||
return unless status.account.local?
|
return unless status.account.local?
|
||||||
|
return if emoji_reaction.remote_custom_emoji?
|
||||||
|
|
||||||
ActivityPub::RawDistributionWorker.perform_async(build_json(emoji_reaction), status.account_id)
|
ActivityPub::RawDistributionWorker.perform_async(build_json(emoji_reaction), status.account_id)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue