summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-10-08 09:51:04 -0700
committerCorey Hulen <corey@hulen.com>2015-10-08 09:51:04 -0700
commite36227405b4bc44fe3cea52f2082c723a91366ea (patch)
tree78f585a8ae7d0da8afc4a5ca03d00302df99c34f /web
parent26252ccebf23d8e0ce6cd0f6b79b268e5c3b90fd (diff)
parent70144962522a5d8db1c46cbd93d83e64b8ca778b (diff)
downloadchat-e36227405b4bc44fe3cea52f2082c723a91366ea.tar.gz
chat-e36227405b4bc44fe3cea52f2082c723a91366ea.tar.bz2
chat-e36227405b4bc44fe3cea52f2082c723a91366ea.zip
Merge pull request #978 from mattermost/plt-355
PLT-355 Fixing ability to dynamicly update members list.
Diffstat (limited to 'web')
-rw-r--r--web/react/components/channel_header.jsx4
-rw-r--r--web/react/components/removed_from_channel_modal.jsx8
-rw-r--r--web/react/components/sidebar.jsx2
3 files changed, 8 insertions, 6 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index f15974d35..92f60ea86 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -58,7 +58,9 @@ export default class ChannelHeader extends React.Component {
$('.channel-header__info .description').popover({placement: 'bottom', trigger: 'hover', html: true, delay: {show: 500, hide: 500}});
}
onSocketChange(msg) {
- if (msg.action === 'new_user') {
+ if (msg.action === 'new_user' ||
+ msg.action === 'user_added' ||
+ (msg.action === 'user_removed' && msg.user_id !== UserStore.getCurrentId())) {
AsyncClient.getChannelExtraInfo(true);
}
}
diff --git a/web/react/components/removed_from_channel_modal.jsx b/web/react/components/removed_from_channel_modal.jsx
index b7ec85457..4cbb8fc82 100644
--- a/web/react/components/removed_from_channel_modal.jsx
+++ b/web/react/components/removed_from_channel_modal.jsx
@@ -26,13 +26,13 @@ export default class RemovedFromChannelModal extends React.Component {
BrowserStore.removeItem('channel-removed-state');
}
+ var townSquare = ChannelStore.getByName('town-square');
+ setTimeout(() => utils.switchChannel(townSquare), 1);
+
this.setState(newState);
}
handleClose() {
- var townSquare = ChannelStore.getByName('town-square');
- utils.switchChannel(townSquare);
-
this.setState({channelName: '', remover: ''});
}
@@ -98,4 +98,4 @@ export default class RemovedFromChannelModal extends React.Component {
return <div/>;
}
-} \ No newline at end of file
+}
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 88eaed335..e2eb92121 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -262,7 +262,7 @@ export default class Sidebar extends React.Component {
if (msg.user_id === UserStore.getCurrentId()) {
AsyncClient.getChannels(true);
- if (msg.props.channel_id === ChannelStore.getCurrentId() && $('#removed_from_channel').length > 0) {
+ if (msg.props.remover !== msg.user_id && msg.props.channel_id === ChannelStore.getCurrentId() && $('#removed_from_channel').length > 0) {
var sentState = {};
sentState.channelName = ChannelStore.getCurrent().display_name;
sentState.remover = UserStore.getProfile(msg.props.remover).username;