From 649ad69643450c6f7c414d9e1705ae5071eb74ba Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Wed, 12 Jul 2017 11:52:31 -0300 Subject: [PATCH] Change `all` to `all_messages` --- packages/rocketchat-lib/server/lib/notifyUsersOnMessage.js | 6 +++--- packages/rocketchat-lib/server/startup/settings.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/rocketchat-lib/server/lib/notifyUsersOnMessage.js b/packages/rocketchat-lib/server/lib/notifyUsersOnMessage.js index 4ed47ae2574c..b14089ad6cb3 100644 --- a/packages/rocketchat-lib/server/lib/notifyUsersOnMessage.js +++ b/packages/rocketchat-lib/server/lib/notifyUsersOnMessage.js @@ -72,17 +72,17 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room) { if (toAll || toHere) { let incUnread = 0; - if (['all', 'group_mentions_only', 'user_and_group_mentions_only'].includes(unreadCount)) { + if (['all_messages', 'group_mentions_only', 'user_and_group_mentions_only'].includes(unreadCount)) { incUnread = 1; } RocketChat.models.Subscriptions.incGroupMentionsAndUnreadForRoomIdExcludingUserId(room._id, message.u._id, 1, incUnread); } else if ((mentionIds && mentionIds.length > 0) || (highlightsIds && highlightsIds.length > 0)) { let incUnread = 0; - if (['all', 'user_mentions_only', 'user_and_group_mentions_only'].includes(unreadCount)) { + if (['all_messages', 'user_mentions_only', 'user_and_group_mentions_only'].includes(unreadCount)) { incUnread = 1; } RocketChat.models.Subscriptions.incUserMentionsAndUnreadForRoomIdAndUserIds(room._id, _.compact(_.unique(mentionIds.concat(highlightsIds))), 1, incUnread); - } else if (unreadCount === 'all') { + } else if (unreadCount === 'all_messages') { RocketChat.models.Subscriptions.incUnreadForRoomIdExcludingUserId(room._id, message.u._id); } } diff --git a/packages/rocketchat-lib/server/startup/settings.js b/packages/rocketchat-lib/server/startup/settings.js index b604caf45cd0..d93b106c04f5 100644 --- a/packages/rocketchat-lib/server/startup/settings.js +++ b/packages/rocketchat-lib/server/startup/settings.js @@ -358,8 +358,8 @@ RocketChat.settings.addGroup('General', function() { type: 'select', values: [ { - key: 'all', - i18nLabel: 'All' + key: 'all_messages', + i18nLabel: 'All_messages' }, { key: 'user_mentions_only', i18nLabel: 'User_mentions_only'