diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index 2c9a3836e..4a91d298b 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -139,7 +139,7 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) if (isLive && event.room_id === $scope.room_id) { scrollToBottom(); - + if (window.Notification) { // Show notification when the window is hidden, or the user is idle if (document.hidden || matrixService.presence.unavailable === mPresence.getState()) { diff --git a/webclient/settings/settings-controller.js b/webclient/settings/settings-controller.js index 8c877a24e..9cdace704 100644 --- a/webclient/settings/settings-controller.js +++ b/webclient/settings/settings-controller.js @@ -194,7 +194,16 @@ angular.module('SettingsController', ['matrixService', 'mFileUpload', 'mFileInpu /*** Desktop notifications section ***/ $scope.settings = { - notifications: undefined + notifications: undefined, + bingWords: matrixService.config().bingWords + }; + + $scope.saveBingWords = function() { + console.log("Saving words: "+JSON.stringify($scope.settings.bingWords)); + var config = matrixService.config(); + config.bingWords = $scope.settings.bingWords; + matrixService.setConfig(config); + matrixService.saveConfig(); }; // If the browser supports it, check the desktop notification state diff --git a/webclient/settings/settings.html b/webclient/settings/settings.html index c358a6e9d..3b3dd3dad 100644 --- a/webclient/settings/settings.html +++ b/webclient/settings/settings.html @@ -52,6 +52,14 @@