summary refs log tree commit diff
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-16 15:47:29 +0100
committerKegan Dougal <kegan@matrix.org>2014-09-16 15:47:29 +0100
commit3395a3305f9477e950849b18c2caacfef70c118b (patch)
treef49c2a8449a343d30a48afbc6c4d8ed4533cbf6c
parenthidden/minimise/focus disaster disclaimer with the TODO (diff)
downloadsynapse-3395a3305f9477e950849b18c2caacfef70c118b.tar.xz
Bing on all the things if there are 0 bing words.
-rw-r--r--webclient/components/matrix/event-handler-service.js6
-rw-r--r--webclient/settings/settings.html1
2 files changed, 7 insertions, 0 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index d61a150463..72859eae3e 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -189,6 +189,12 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
                 // notifications when currently viewing the chat screen though, but that is preferable to the alternative imo.
                 var isIdle = (document.hidden || matrixService.presence.unavailable === mPresence.getState());
                 
+                // always bing if there are 0 bing words... apparently.
+                var bingWords = matrixService.config().bingWords;
+                if (bingWords && bingWords.length === 0) {
+                    shouldBing = true;
+                }
+                
                 if (shouldBing) {
                     console.log("Displaying notification for "+JSON.stringify(event));
                     var notification = new window.Notification(
diff --git a/webclient/settings/settings.html b/webclient/settings/settings.html
index 1a42ae435a..b251cce569 100644
--- a/webclient/settings/settings.html
+++ b/webclient/settings/settings.html
@@ -54,6 +54,7 @@
                 Notifications are enabled. You will be alerted when a message contains your user ID or display name.
                 <div class="section">
                     <h4>Additional words to alert on:</h4>
+                    <p>Leave blank to alert on all messages.</p>
                     <input size=40 name="bingWords" ng-model="settings.bingWords" ng-list placeholder="Enter case-sensitive words separated with ,"
                     ng-blur="saveBingWords()"/>
                     <ul>