From 4e15a89b392761b889c849e03bf77e52e39889da 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 79d1eaaf3..de2fd1de9 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?