I am adding chat messaging to an iOS app and want to use emojis/reactions within messages (text inside a message) and to messages (as reactions to a message) - very similar to messenger/instagram messages.
We're using Postgres 12 (open to upgrading to 13 or 14, if need be).
Adding emojis/reactions as part of the message taken from the keyboard input appears to work fine in the database - it appears as a character.
For adding reactions to a message, we're storing it as a record with a column called type that's set as an ENUM of text and reaction and adding it as a record that points to the corresponding record and storing the emoji/reaction as a char inside message itself.
In a few months, we plan to add Android.
Questions:
- Is there a better way to handle this?
- Should we use Unicode instead?
- Any suggestions on how to detect which emoji is equivalent on the other platform? i.e., a Winking Face with Tongue on iOS match on Android?