summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-07-13 13:18:50 -0700
committernickago <ngonella@calpoly.edu>2015-07-27 14:07:23 -0700
commitc9459feb59a3dc05de229aea7652b0a726ac98bf (patch)
tree01cd48bc40b0d9e2390182f67a9b84376281dba0 /web/react
parent85ff151b71a5b0a488b7a8c3f0978b5d0ee8e280 (diff)
downloadchat-c9459feb59a3dc05de229aea7652b0a726ac98bf.tar.gz
chat-c9459feb59a3dc05de229aea7652b0a726ac98bf.tar.bz2
chat-c9459feb59a3dc05de229aea7652b0a726ac98bf.zip
When removed from a channel, user is sent back to town square and that
channel is removed from their sidebar
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/sidebar.jsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 3cf67e410..ed75e51cf 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -197,6 +197,14 @@ module.exports = React.createClass({
if (UserStore.getCurrentId() === msg.user_id) {
AsyncClient.getChannels(true);
}
+ } else if(msg.action === "user_removed") {
+ if(msg.user_id === UserStore.getCurrentId()) {
+ AsyncClient.getChannels(true);
+
+ if(msg.props.channel_id === ChannelStore.getCurrentId()) {
+ window.location.reload();
+ }
+ }
}
},
updateTitle: function() {