From f4f1cc9eabe071bb60cc1a5fcbc047339d660cad Mon Sep 17 00:00:00 2001 From: Plastikmensch Date: Wed, 17 May 2023 14:26:40 +0200 Subject: [PATCH] Only allow reacting with remote emojis when status is local Handling remote reactions with foreign emojis would require an extensive rewrite of vanilla code, so instead prevent reactions with remote emojis when the status is not local. Signed-off-by: Plastikmensch --- app/services/react_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/react_service.rb b/app/services/react_service.rb index 79d1eaaf30..de2fd1de9c 100644 --- a/app/services/react_service.rb +++ b/app/services/react_service.rb @@ -8,6 +8,8 @@ class ReactService < BaseService authorize_with account, status, :react? name, domain = emoji.split('@') + return unless domain.nil? || status.local? + custom_emoji = CustomEmoji.find_by(shortcode: name, domain: domain) reaction = StatusReaction.find_by(account: account, status: status, name: name, custom_emoji: custom_emoji) return reaction unless reaction.nil?