summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'webapp')
-rw-r--r--webapp/actions/websocket_actions.jsx13
-rw-r--r--webapp/utils/constants.jsx3
2 files changed, 15 insertions, 1 deletions
diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index db301d539..bf9b05cb7 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -230,6 +230,10 @@ function handleEvent(msg) {
handleReactionRemovedEvent(msg);
break;
+ case SocketEvents.EMOJI_ADDED:
+ handleAddEmoji(msg);
+ break;
+
default:
}
}
@@ -438,6 +442,15 @@ function handleReactionAddedEvent(msg) {
});
}
+function handleAddEmoji(msg) {
+ const data = JSON.parse(msg.data.emoji);
+
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.RECEIVED_CUSTOM_EMOJI,
+ emoji: data
+ });
+}
+
function handleReactionRemovedEvent(msg) {
const reaction = JSON.parse(msg.data.reaction);
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx
index 11fe77613..1d49d1cae 100644
--- a/webapp/utils/constants.jsx
+++ b/webapp/utils/constants.jsx
@@ -242,7 +242,8 @@ export const SocketEvents = {
HELLO: 'hello',
WEBRTC: 'webrtc',
REACTION_ADDED: 'reaction_added',
- REACTION_REMOVED: 'reaction_removed'
+ REACTION_REMOVED: 'reaction_removed',
+ EMOJI_ADDED: 'emoji_added'
};
export const TutorialSteps = {