How to determine whether an emoji has variations
wfischer42 opened this issue · 0 comments
I'm building an emoji tapback component and I want people to be able to quick-tap to react the same way someone else has already reacted. It's similar to Slack, where the user's saved default skin-tone will be applied.
The trouble is, I can't find a way to determine whether or not any given emoji has variants as an option, so there's no way to determine when the skin-tone modifier should or shouldn't be applied. The Emoji
component doesn't differentiate either: if it gets passed a unified
value that includes an invalid variant modifier, it shows the broken image placeholder.
Is there any way to programmatically determine whether a given unified code will still be valid if a skin-tone modifier is attached?