[PLT-6800] Clear center and rhs view on other window when leaving a channel (#6723)

* clear center and rhs view on other window when leaving a channel

* move redirection to websocket actions

* close sidebar at websocket action
This commit is contained in:
Saturnino Abril
2017-07-06 04:36:50 +08:00
committed by Joram Wilander
parent 04e364f4f7
commit af35dcf9c4

View File

@@ -341,6 +341,11 @@ function handleUserRemovedEvent(msg) {
$('#removed_from_channel').modal('show');
}
GlobalActions.toggleSideBarAction(false);
const townsquare = ChannelStore.getByName('town-square');
browserHistory.push(TeamStore.getCurrentTeamRelativeUrl() + '/channels/' + townsquare.name);
dispatch({
type: ChannelTypes.LEAVE_CHANNEL,
data: {id: msg.data.channel_id, user_id: msg.broadcast.user_id}