I'm working on a React application where we fetch chat information from Slack and display it in a frontend application using React.
Sometimes the chats use Slack emotes such as :wave:
which Slack automatically parses and displays a wave icon.
I am wondering if I can do something similar in the frontend with React? Or am I stuck with :wave: as a text.
Thank you!
You can tokenize the input strings to extract each emoji name string (short name / shortcode) within.
After tokenization of the input strings, you can map each emoji name to the unicode sequence (actual emoji) to which the name belongs, replacing it in the source string.
The Slack mappings are derived from this repository dataset, maintained by Cal Henderson (co-founder/CTO). He also maintains another repo which handles the conversion task that you asked about.