 
 				# If the message is @all, send a notification to all online room users except for the sender.
 				if toAll and room.usernames?.length > 0
-					onlineUsersOfRoom = Meteor.users.find({
+					onlineUsersOfRoom = RocketChat.models.Users.find({
 							username: {$in: room.usernames},
 							_id: {$ne: user._id}
 							status: {$in: ['online', 'away', 'busy']}},

			###
			RocketChat.models.Subscriptions.incUnreadOfDirectForRoomIdExcludingUserId message.rid, message.u._id, 1

			userOfMention = Meteor.users.findOne({_id: message.rid.replace(message.u._id, '')}, {fields: {username: 1, statusConnection: 1}})
			if userOfMention?
				RocketChat.Notifications.notifyUser userOfMention._id, 'notification',
					title: "@#{user.username}"

			toAll = mentionIds.indexOf('all') > -1

			if mentionIds.length > 0
				usersOfMention = RocketChat.models.Users.find({_id: {$in: mentionIds}}, {fields: {_id: 1, username: 1}}).fetch()

				if room.t is 'c' and !toAll
					for usersOfMentionItem in usersOfMention
