mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 15:38:06 +01:00
Normalize emojis with variant selectors
This commit is contained in:
parent
3226459053
commit
02b602a4e4
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,9 @@ class ReactService < BaseService
|
||||||
name, domain = emoji.split('@')
|
name, domain = emoji.split('@')
|
||||||
return unless domain.nil? || status.local?
|
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)
|
custom_emoji = CustomEmoji.find_by(shortcode: name, domain: domain)
|
||||||
reaction = StatusReaction.find_by(account: account, status: status, name: name, custom_emoji: custom_emoji)
|
reaction = StatusReaction.find_by(account: account, status: status, name: name, custom_emoji: custom_emoji)
|
||||||
return reaction unless reaction.nil?
|
return reaction unless reaction.nil?
|
||||||
|
|
Loading…
Reference in a new issue