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

Make all rooms noisy by default #60

Merged
merged 3 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/60.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make all rooms noisy by default.
12 changes: 10 additions & 2 deletions synapse/push/baserules.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ def make_base_prepend_rules(kind, modified_base_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.*)...
Expand All @@ -349,7 +353,11 @@ def make_base_prepend_rules(kind, modified_base_rules):
"_id": "_encrypted",
}
],
"actions": ["notify", {"set_tweak": "highlight", "value": False}],
"actions": [
"notify",
{"set_tweak": "sound", "value": "default"},
{"set_tweak": "highlight", "value": False},
],
},
]

Expand Down
12 changes: 6 additions & 6 deletions tests/push/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ def test_sends_high_priority_for_one_to_one_only(self):
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):
"""
Expand Down Expand Up @@ -418,8 +418,8 @@ def test_sends_high_priority_for_mention(self):
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):
"""
Expand Down Expand Up @@ -497,5 +497,5 @@ def test_sends_high_priority_for_atroom(self):
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")