mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-15 03:10:46 -05:00
Add room member count condition and default rule to make a noise on rooms of only 2 people.
This commit is contained in:
parent
1251d017c1
commit
322a047502
3 changed files with 63 additions and 6 deletions
|
|
@ -375,9 +375,12 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
"redacted": del_sql,
|
||||
}
|
||||
|
||||
if event_type:
|
||||
if event_type and state_key is not None:
|
||||
sql += " AND s.type = ? AND s.state_key = ? "
|
||||
args = (room_id, event_type, state_key)
|
||||
elif event_type:
|
||||
sql += " AND s.type = ?"
|
||||
args = (room_id, event_type)
|
||||
else:
|
||||
args = (room_id, )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue