summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-28 20:56:14 -0400
committerenahum <nahumhbl@gmail.com>2017-06-28 20:56:14 -0400
commit2a96b7e15ea0a6da2d5397140aff9478945d8828 (patch)
tree92a1dbbb8b4fcc11bc59b4c6703f30f3b38943ee /webapp
parentc6602ae2b81dcddc43e7b7cc359ea8335953b9d0 (diff)
downloadchat-2a96b7e15ea0a6da2d5397140aff9478945d8828.tar.gz
chat-2a96b7e15ea0a6da2d5397140aff9478945d8828.tar.bz2
chat-2a96b7e15ea0a6da2d5397140aff9478945d8828.zip
Remove unneeded return and add logging for marking channels unread (#6788)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/stores/channel_store.jsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx
index 58ea19419..1ffad280f 100644
--- a/webapp/stores/channel_store.jsx
+++ b/webapp/stores/channel_store.jsx
@@ -448,7 +448,8 @@ class ChannelStoreClass extends EventEmitter {
incrementMessages(id, markRead = false) {
if (!this.unreadCounts[id]) {
- return;
+ // Should never happen
+ console.log(`Missing channel_id=${id} in unreads object`); //eslint-disable-line no-console
}
const member = this.getMyMember(id);
@@ -483,11 +484,11 @@ class ChannelStoreClass extends EventEmitter {
}
if (!this.unreadCounts[id]) {
- return;
+ // Should never happen
+ console.log(`Missing channel_id=${id} in unreads object`); //eslint-disable-line no-console
}
if (mentions.indexOf(UserStore.getCurrentId()) !== -1) {
- this.unreadCounts[id].mentions++;
const member = {...this.getMyMember(id)};
member.mention_count++;
store.dispatch({