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);
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user