Fixing permalinks to channels your not a memeber of (#2805)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
d962e175f8
Коммит
fa807d8e43
@@ -288,6 +288,14 @@ class ChannelStoreClass extends EventEmitter {
|
||||
getUnreadCounts() {
|
||||
return this.unreadCounts;
|
||||
}
|
||||
|
||||
leaveChannel(id) {
|
||||
delete this.channelMembers[id];
|
||||
const element = this.channels.indexOf(id);
|
||||
if (element > -1) {
|
||||
this.channels.splice(element, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var ChannelStore = new ChannelStoreClass();
|
||||
@@ -349,6 +357,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
|
||||
break;
|
||||
|
||||
case ActionTypes.LEAVE_CHANNEL:
|
||||
ChannelStore.leaveChannel(action.id);
|
||||
ChannelStore.emitLeave(action.id);
|
||||
break;
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user