1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-30 15:58:28 +09:00

Normalize emojis with variant selectors

This commit is contained in:
Essem 2024-01-13 18:16:57 -06:00
parent cf8ec7193b
commit f64726eb75
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C

View File

@ -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?