when a channel is update propagate the channel to everybody (#6677)

Этот коммит содержится в:
Carlos Tadeu Panato Junior
2017-06-21 22:01:05 +02:00
коммит произвёл Christopher Speller
родитель a9ef8b52aa
Коммит 1e84e931ec
4 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@@ -186,6 +186,10 @@ function handleEvent(msg) {
handleChannelDeletedEvent(msg);
break;
case SocketEvents.CHANNEL_UPDATED:
handleChannelUpdatedEvent(msg);
break;
case SocketEvents.DIRECT_ADDED:
handleDirectAddedEvent(msg);
break;
@@ -358,6 +362,11 @@ function handleUserRemovedEvent(msg) {
}
}
function handleChannelUpdatedEvent(msg) {
const channel = JSON.parse(msg.data.channel);
dispatch({type: ChannelTypes.RECEIVED_CHANNEL, data: channel});
}
function handleUserUpdatedEvent(msg) {
const user = msg.data.user;
if (UserStore.getCurrentId() !== user.id) {