mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Remove unneeded return and add logging for marking channels unread (#6788)
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user