summary refs log tree commit diff
path: root/webclient/room/room-controller.js
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-06 18:28:24 +0100
committerErik Johnston <erik@matrix.org>2014-09-06 18:28:24 +0100
commita73104b5667df8c63a7eafa6678bf557673600e5 (patch)
tree9a3368b419fdd0f553d779b2330ed4c4b894d1ad /webclient/room/room-controller.js
parentMerge branch 'release-v0.2.2' of github.com:matrix-org/synapse (diff)
parentfix desktop notifs, which were broken in eab463fd (diff)
downloadsynapse-a73104b5667df8c63a7eafa6678bf557673600e5.tar.xz
Merge branch 'release-v0.2.2' of github.com:matrix-org/synapse
Diffstat (limited to 'webclient/room/room-controller.js')
-rw-r--r--webclient/room/room-controller.js4
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