Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit b8d7ca9

Browse files
authored
Make all rooms noisy by default (#60)
1 parent 3fe1c84 commit b8d7ca9

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

changelog.d/60.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make all rooms noisy by default.

synapse/push/baserules.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,11 @@ def make_base_prepend_rules(kind, modified_base_rules):
335335
"_id": "_message",
336336
}
337337
],
338-
"actions": ["notify", {"set_tweak": "highlight", "value": False}],
338+
"actions": [
339+
"notify",
340+
{"set_tweak": "sound", "value": "default"},
341+
{"set_tweak": "highlight", "value": False},
342+
],
339343
},
340344
# XXX: this is going to fire for events which aren't m.room.messages
341345
# but are encrypted (e.g. m.call.*)...
@@ -349,7 +353,11 @@ def make_base_prepend_rules(kind, modified_base_rules):
349353
"_id": "_encrypted",
350354
}
351355
],
352-
"actions": ["notify", {"set_tweak": "highlight", "value": False}],
356+
"actions": [
357+
"notify",
358+
{"set_tweak": "sound", "value": "default"},
359+
{"set_tweak": "highlight", "value": False},
360+
],
353361
},
354362
]
355363

tests/push/test_http.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ def test_sends_high_priority_for_one_to_one_only(self):
346346
self.assertEqual(len(self.push_attempts), 2)
347347
self.assertEqual(self.push_attempts[1][1], "example.com")
348348

349-
# check that this is low-priority
350-
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "low")
349+
# check that this is high-priority
350+
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "high")
351351

352352
def test_sends_high_priority_for_mention(self):
353353
"""
@@ -418,8 +418,8 @@ def test_sends_high_priority_for_mention(self):
418418
self.assertEqual(len(self.push_attempts), 2)
419419
self.assertEqual(self.push_attempts[1][1], "example.com")
420420

421-
# check that this is low-priority
422-
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "low")
421+
# check that this is high-priority
422+
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "high")
423423

424424
def test_sends_high_priority_for_atroom(self):
425425
"""
@@ -497,5 +497,5 @@ def test_sends_high_priority_for_atroom(self):
497497
self.assertEqual(len(self.push_attempts), 2)
498498
self.assertEqual(self.push_attempts[1][1], "example.com")
499499

500-
# check that this is low-priority
501-
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "low")
500+
# check that this is high-priority
501+
self.assertEqual(self.push_attempts[1][2]["notification"]["prio"], "high")

0 commit comments

Comments
 (0)