summaryrefslogtreecommitdiffstats
path: root/web/react/components/channel_header.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/channel_header.jsx')
-rw-r--r--web/react/components/channel_header.jsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index 48cb4d13b..68de80228 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -4,6 +4,7 @@
var ChannelStore = require('../stores/channel_store.jsx');
var UserStore = require('../stores/user_store.jsx');
var PostStore = require('../stores/post_store.jsx');
+var SocketStore = require('../stores/socket_store.jsx')
var UserProfile = require( './user_profile.jsx' );
var NavbarSearchBox =require('./search_bar.jsx');
var AsyncClient = require('../utils/async_client.jsx');
@@ -82,6 +83,7 @@ module.exports = React.createClass({
ChannelStore.addExtraInfoChangeListener(this._onChange);
PostStore.addSearchChangeListener(this._onChange);
UserStore.addChangeListener(this._onChange);
+ SocketStore.addChangeListener(this._onSocketChange);
},
componentWillUnmount: function() {
ChannelStore.removeChangeListener(this._onChange);
@@ -96,6 +98,11 @@ module.exports = React.createClass({
}
$(".channel-header__info .description").popover({placement : 'bottom', trigger: 'hover', html: true, delay: {show: 500, hide: 500}});
},
+ _onSocketChange: function(msg) {
+ if(msg.action === "new_user") {
+ AsyncClient.getChannelExtraInfo(true);
+ }
+ },
getInitialState: function() {
return getStateFromStores();
},