Skip to content
Snippets Groups Projects
Commit a73104b5 authored by Erik Johnston's avatar Erik Johnston
Browse files

Merge branch 'release-v0.2.2' of github.com:matrix-org/synapse

parents d12feed6 41907209
Branches
Tags
No related merge requests found
...@@ -24,7 +24,7 @@ angular.module('mPresence', []) ...@@ -24,7 +24,7 @@ angular.module('mPresence', [])
.service('mPresence', ['$timeout', 'matrixService', function ($timeout, matrixService) { .service('mPresence', ['$timeout', 'matrixService', function ($timeout, matrixService) {
// Time in ms after that a user is considered as unavailable/away // Time in ms after that a user is considered as unavailable/away
var UNAVAILABLE_TIME = 5 * 60000; // 5 mins var UNAVAILABLE_TIME = 3 * 60000; // 3 mins
// The current presence state // The current presence state
var state = undefined; var state = undefined;
......
...@@ -62,8 +62,8 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) ...@@ -62,8 +62,8 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
scrollToBottom(); scrollToBottom();
if (window.Notification) { if (window.Notification) {
// Show notification when the user is idle // Show notification when the window is hidden, or the user is idle
if (matrixService.presence.offline === mPresence.getState()) { if (document.hidden || matrixService.presence.unavailable === mPresence.getState()) {
var notification = new window.Notification( var notification = new window.Notification(
($scope.members[event.user_id].displayname || event.user_id) + ($scope.members[event.user_id].displayname || event.user_id) +
" (" + ($scope.room_alias || $scope.room_id) + ")", // FIXME: don't leak room_ids here " (" + ($scope.room_alias || $scope.room_id) + ")", // FIXME: don't leak room_ids here
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment