You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emoji sent out for federation are garbled - they are missing the variation selector \ufe0f. It is not possible to recover the original emoji from this state, as different emoji need it at different positions, and some even need it multiple times (requiring emoji.length factorial match attempts to recover the original sequence).
🥰 Expected Behavior
Emoji are sent out as valid, un-garbled unicode emoji codepoints.
💡 Summary
Emoji sent out for federation are garbled - they are missing the variation selector
\ufe0f
. It is not possible to recover the original emoji from this state, as different emoji need it at different positions, and some even need it multiple times (requiring emoji.length factorial match attempts to recover the original sequence).🥰 Expected Behavior
Emoji are sent out as valid, un-garbled unicode emoji codepoints.
🤬 Actual Behavior
Emoji are sent out as garbled emoji.
This happens in part due to this regex not being suitable for the purpose of detecting valid emoji sequences, and its match functionality stripping the variant selector (as it's meant for twemoji code point lookups, not for normalizing emoji sequences):
https://github.com/misskey-dev/misskey/blob/34f8345bc8330e0e53ab9e043a4b6db7b150636f/packages/backend/src/misc/emoji-regex.ts
On top of this, for some emoji, you are stripping it manually:
misskey/packages/backend/src/core/ReactionService.ts
Line 396 in 34f8345
This causes interoperability issues with remote instances that enforce reactions to be valid unicode emoji sequences.
The text was updated successfully, but these errors were encountered: