summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-10-26 15:01:18 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-10-26 15:01:18 -0400
commitb826d094808ec27622b8c22a03195f36db86792b (patch)
tree2873ee5c87293c4569f969bcee1824d7aac267b5 /web
parent101497ec091ddac3d311b5489d7e5097cafd7ed1 (diff)
parentfda62fbbf576ead8aea3b4a39a167b7f2d218142 (diff)
downloadchat-b826d094808ec27622b8c22a03195f36db86792b.tar.gz
chat-b826d094808ec27622b8c22a03195f36db86792b.tar.bz2
chat-b826d094808ec27622b8c22a03195f36db86792b.zip
Merge pull request #1189 from mattermost/plt-762
PLT-762 Fix error message on leaving channel
Diffstat (limited to 'web')
-rw-r--r--web/react/stores/socket_store.jsx2
-rw-r--r--web/react/utils/async_client.jsx4
-rw-r--r--web/react/utils/constants.jsx1
3 files changed, 4 insertions, 3 deletions
diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx
index 9410c1e9c..d4b0e62db 100644
--- a/web/react/stores/socket_store.jsx
+++ b/web/react/stores/socket_store.jsx
@@ -160,7 +160,7 @@ function handleNewPostEvent(msg) {
if (window.isActive) {
AsyncClient.updateLastViewedAt(true);
}
- } else {
+ } else if (UserStore.getCurrentId() !== msg.user_id || post.type !== Constants.POST_TYPE_JOIN_LEAVE) {
AsyncClient.getChannel(msg.channel_id);
}
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index b1bc71d54..75dd35e3f 100644
--- a/web/react/utils/async_client.jsx
+++ b/web/react/utils/async_client.jsx
@@ -132,7 +132,7 @@ export function getChannel(id) {
callTracker['getChannel' + id] = utils.getTimestamp();
client.getChannel(id,
- function getChannelSuccess(data, textStatus, xhr) {
+ (data, textStatus, xhr) => {
callTracker['getChannel' + id] = 0;
if (xhr.status === 304 || !data) {
@@ -145,7 +145,7 @@ export function getChannel(id) {
member: data.member
});
},
- function getChannelFailure(err) {
+ (err) => {
callTracker['getChannel' + id] = 0;
dispatchError(err, 'getChannel');
}
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index cda04bf04..0e89b9470 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -98,6 +98,7 @@ module.exports = {
POST_LOADING: 'loading',
POST_FAILED: 'failed',
POST_DELETED: 'deleted',
+ POST_TYPE_JOIN_LEAVE: 'join_leave',
RESERVED_TEAM_NAMES: [
'www',
'web',