summaryrefslogtreecommitdiffstats
path: root/web/react/stores
diff options
context:
space:
mode:
authorAsaad Mahmood <Unknowngi@live.com>2015-10-27 20:15:33 +0500
committerAsaad Mahmood <Unknowngi@live.com>2015-10-27 20:15:33 +0500
commit179c4ea684af8d2a021cc6f0042bc4408f39b0bb (patch)
tree7789805249e5c962f1175f301beb74272dee30c0 /web/react/stores
parent68b02ffb9eeb7a414feae8ed89b4011ccecf96bc (diff)
parent50eb3d9fe46d6364b6f12201edfe0a401be3ccdd (diff)
downloadchat-179c4ea684af8d2a021cc6f0042bc4408f39b0bb.tar.gz
chat-179c4ea684af8d2a021cc6f0042bc4408f39b0bb.tar.bz2
chat-179c4ea684af8d2a021cc6f0042bc4408f39b0bb.zip
Merge branch 'master' of https://github.com/mattermost/platform into ui-improvements
Diffstat (limited to 'web/react/stores')
-rw-r--r--web/react/stores/socket_store.jsx4
-rw-r--r--web/react/stores/user_store.jsx14
2 files changed, 16 insertions, 2 deletions
diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx
index 9410c1e9c..4d69a6716 100644
--- a/web/react/stores/socket_store.jsx
+++ b/web/react/stores/socket_store.jsx
@@ -86,7 +86,7 @@ class SocketStoreClass extends EventEmitter {
this.failCount = this.failCount + 1;
- ErrorStore.storeLastError({connErrorCount: this.failCount, message: 'We cannot reach the Mattermost service. The service may be down or misconfigured. Please contact an administrator to make sure the WebSocket port is configured properly.'});
+ ErrorStore.storeLastError({connErrorCount: this.failCount, message: 'Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port.'});
ErrorStore.emitChange();
};
@@ -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/stores/user_store.jsx b/web/react/stores/user_store.jsx
index 575e6d51e..ce80c5ec9 100644
--- a/web/react/stores/user_store.jsx
+++ b/web/react/stores/user_store.jsx
@@ -48,6 +48,7 @@ class UserStoreClass extends EventEmitter {
this.getProfilesUsernameMap = this.getProfilesUsernameMap.bind(this);
this.getProfiles = this.getProfiles.bind(this);
this.getActiveOnlyProfiles = this.getActiveOnlyProfiles.bind(this);
+ this.getActiveOnlyProfileList = this.getActiveOnlyProfileList.bind(this);
this.saveProfile = this.saveProfile.bind(this);
this.setSessions = this.setSessions.bind(this);
this.getSessions = this.getSessions.bind(this);
@@ -215,6 +216,19 @@ class UserStoreClass extends EventEmitter {
return active;
}
+ getActiveOnlyProfileList() {
+ const profileMap = this.getActiveOnlyProfiles();
+ const profiles = [];
+
+ for (const id in profileMap) {
+ if (profileMap.hasOwnProperty(id)) {
+ profiles.push(profileMap[id]);
+ }
+ }
+
+ return profiles;
+ }
+
saveProfile(profile) {
var ps = this.getProfiles();
ps[profile.id] = profile;