Skip to content
Snippets Groups Projects
Unverified Commit 25c18510 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Merge remote-tracking branch 'origin/develop' into admin-tests-base

parents f12312bc b22cd3e4
No related branches found
No related tags found
No related merge requests found
......@@ -42,9 +42,7 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room) {
mentionIds = [];
highlightsIds = [];
toAll = false;
console.time('notifyUsersOnMessage');
highlights = RocketChat.models.Users.findUsersByUsernamesWithHighlights(room.usernames, { fields: { '_id': 1, 'settings.preferences.highlights': 1 }}).fetch();
console.timeEnd('notifyUsersOnMessage');
if (message.mentions != null) {
message.mentions.forEach(function(mention) {
......
......@@ -94,9 +94,7 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room) {
userIdsToPushNotify = [];
usersWithHighlights = [];
console.time('sendNotificationOnMessage');
highlights = RocketChat.models.Users.findUsersByUsernamesWithHighlights(room.usernames, { fields: { '_id': 1, 'settings.preferences.highlights': 1 }}).fetch();
console.timeEnd('sendNotificationOnMessage');
highlights.forEach(function(user) {
if (messageContainsHighlight(message, user.settings.preferences.highlights)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment