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
As we can see, the event contains only the associated short code of the reaction that is added to the post. While this might be ok, it presents two problems:
If the user adds ":smile:" as a reaction, the event will instead contain :smile:, which might be confusing to watch from an external point of view cause it doesn't tell where that code comes from and where the value has gone.
If the user needs to have both the added value as well as the added shortcode, he will need to parse the event and the message, which is pretty strange.
Solution
In order to improve the usability of such events, what I suggest we should do is adding another attribute to both the event emitted when processing MsgAddPostReaction and the one emitted when processing MsgRemovePostReaction so that both contain:
the shortcode of the added reaction
the value (either emoji or URI) of the added reaction. This can be read from the store (if already registered) or from the value (if an emoji).
The text was updated successfully, but these errors were encountered:
Context
Currently when a user adds or removes a reaction to a post, the following event is emitted:
As we can see, the event contains only the associated short code of the reaction that is added to the post. While this might be ok, it presents two problems:
If the user adds ":smile:" as a reaction, the event will instead contain
:smile:
, which might be confusing to watch from an external point of view cause it doesn't tell where that code comes from and where the value has gone.If the user needs to have both the added value as well as the added shortcode, he will need to parse the event and the message, which is pretty strange.
Solution
In order to improve the usability of such events, what I suggest we should do is adding another attribute to both the event emitted when processing
MsgAddPostReaction
and the one emitted when processingMsgRemovePostReaction
so that both contain:shortcode
of the added reactionvalue
(either emoji or URI) of the added reaction. This can be read from the store (if already registered) or from the value (if an emoji).The text was updated successfully, but these errors were encountered: