Skip to content

Commit

Permalink
[FIX] Desktop notifications not displayed when agent has not focused …
Browse files Browse the repository at this point in the history
…the browser (#10221)

* Fix desktop notifications when agent has not focussed the browser.

* Fix trailing spaces.
  • Loading branch information
renatobecker authored and rodrigok committed Apr 16, 2018
1 parent 154fc88 commit f64e03c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room, userId) {

const pushUsernames = {};

const user = RocketChat.models.Users.findOneById(message.u._id);
const user = (room.t !== 'l') ? RocketChat.models.Users.findOneById(message.u._id) : room.v;

// might be a livechat visitor
if (!user) {
return message;
}
Expand Down

0 comments on commit f64e03c

Please sign in to comment.