PLT-3711: Add websocket event for emoji addition (#6211)
* PLT-3711: Add websocket event for emoji addition * (SA) updated as per review This PR is edited directly to merge into master. * (SA) updated as per review This PR is edited directly to merge into master.
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
4df36a504c
Коммит
33eb77b757
@@ -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);
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Ссылка в новой задаче
Block a user