diff options
author | Matthew Hodgson <matthew@matrix.org> | 2014-09-06 10:26:30 -0700 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2014-09-06 10:26:41 -0700 |
commit | 41907209bbc7a98c461f5c30dab75bc58164a77e (patch) | |
tree | 79a1887a11b44f952320d282847bed34a47e94e3 /webclient/room/room-controller.js | |
parent | Center recaptcha dialog. (diff) | |
download | synapse-41907209bbc7a98c461f5c30dab75bc58164a77e.tar.xz |
fix desktop notifs, which were broken in eab463fd
Diffstat (limited to '')
-rw-r--r-- | webclient/room/room-controller.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index e69adb9b46..c702917fef 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -62,8 +62,8 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) scrollToBottom(); if (window.Notification) { - // Show notification when the user is idle - if (matrixService.presence.offline === mPresence.getState()) { + // Show notification when the window is hidden, or the user is idle + if (document.hidden || matrixService.presence.unavailable === mPresence.getState()) { var notification = new window.Notification( ($scope.members[event.user_id].displayname || event.user_id) + " (" + ($scope.room_alias || $scope.room_id) + ")", // FIXME: don't leak room_ids here |