mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-23 01:55:53 +03:00
Bing on all the things if there are 0 bing words.
This commit is contained in:
parent
5aaa3c09c1
commit
3395a3305f
2 changed files with 7 additions and 0 deletions
|
@ -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.
|
// 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());
|
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) {
|
if (shouldBing) {
|
||||||
console.log("Displaying notification for "+JSON.stringify(event));
|
console.log("Displaying notification for "+JSON.stringify(event));
|
||||||
var notification = new window.Notification(
|
var notification = new window.Notification(
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
Notifications are enabled. You will be alerted when a message contains your user ID or display name.
|
Notifications are enabled. You will be alerted when a message contains your user ID or display name.
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h4>Additional words to alert on:</h4>
|
<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 ,"
|
<input size=40 name="bingWords" ng-model="settings.bingWords" ng-list placeholder="Enter case-sensitive words separated with ,"
|
||||||
ng-blur="saveBingWords()"/>
|
ng-blur="saveBingWords()"/>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
Loading…
Reference in a new issue