1
0

Make all rooms noisy by default (#60)

This commit is contained in:
Mathieu Velten
2020-09-18 12:35:41 +02:00
committed by GitHub
parent 3fe1c8485b
commit b8d7ca9946
3 changed files with 17 additions and 8 deletions

1
changelog.d/60.misc Normal file
View File

@@ -0,0 +1 @@
Make all rooms noisy by default.

View File

@@ -335,7 +335,11 @@ BASE_APPEND_UNDERRIDE_RULES = [
"_id": "_message",
}
],
"actions": ["notify", {"set_tweak": "highlight", "value": False}],
"actions": [
"notify",
{"set_tweak": "sound", "value": "default"},
{"set_tweak": "highlight", "value": False},
],
},
# XXX: this is going to fire for events which aren't m.room.messages
# but are encrypted (e.g. m.call.*)...
@@ -349,7 +353,11 @@ BASE_APPEND_UNDERRIDE_RULES = [
"_id": "_encrypted",
}
],
"actions": ["notify", {"set_tweak": "highlight", "value": False}],
"actions": [
"notify",
{"set_tweak": "sound", "value": "default"},
{"set_tweak": "highlight", "value": False},
],
},
]

View File

@@ -346,8 +346,8 @@ class HTTPPusherTests(HomeserverTestCase):
self.assertEqual(len(self.push_attempts), 2)
self.assertEqual(self.push_attempts[1][1], "example.com")
# check that this is low-priority
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "low")
# check that this is high-priority
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "high")
def test_sends_high_priority_for_mention(self):
"""
@@ -418,8 +418,8 @@ class HTTPPusherTests(HomeserverTestCase):
self.assertEqual(len(self.push_attempts), 2)
self.assertEqual(self.push_attempts[1][1], "example.com")
# check that this is low-priority
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "low")
# check that this is high-priority
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "high")
def test_sends_high_priority_for_atroom(self):
"""
@@ -497,5 +497,5 @@ class HTTPPusherTests(HomeserverTestCase):
self.assertEqual(len(self.push_attempts), 2)
self.assertEqual(self.push_attempts[1][1], "example.com")
# check that this is low-priority
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "low")
# check that this is high-priority
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "high")