Skip to content

Commit

Permalink
Change all to all_messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok committed Jul 12, 2017
1 parent 9d2f6fc commit 649ad69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/rocketchat-lib/server/lib/notifyUsersOnMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/rocketchat-lib/server/startup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 649ad69

Please sign in to comment.