[FIX] mail: do not update count if message in no channel
When a message is not part of any channel, the message counter is incremented while the message won't appear in any channel. This leads to an inconsistency between the number of messages displayed in the status bar and the actual messages in Discuss. opw-706884
This commit is contained in:
@@ -479,7 +479,9 @@ function on_needaction_notification (message) {
|
||||
increment_unread: true,
|
||||
});
|
||||
invalidate_caches(message.channel_ids);
|
||||
needaction_counter++;
|
||||
if (message.channel_ids.length !== 0) {
|
||||
needaction_counter++;
|
||||
}
|
||||
_.each(message.channel_ids, function (channel_id) {
|
||||
var channel = chat_manager.get_channel(channel_id);
|
||||
if (channel) {
|
||||
|
||||
Reference in New Issue
Block a user