From daf85021639ce2303b838f0caadebaf48ebaa19c Mon Sep 17 00:00:00 2001 From: Essem Date: Sat, 13 Jan 2024 18:16:57 -0600 Subject: [PATCH] Normalize emojis with variant selectors --- app/services/react_service.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/services/react_service.rb b/app/services/react_service.rb index cfc3f99a78..be19bd8501 100644 --- a/app/services/react_service.rb +++ b/app/services/react_service.rb @@ -10,6 +10,9 @@ class ReactService < BaseService name, domain = emoji.split('@') return unless domain.nil? || status.local? + normalized = "#{name}\uFE0F" + name = normalized if StatusReactionValidator::SUPPORTED_EMOJIS.include?(normalized) + 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?