mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:36:02 -04:00
Support for channel notifications
Add condition type to check the sender's power level and add a base rule using it for @channel notifications.
This commit is contained in:
parent
44f8e383f3
commit
fa969cfdde
3 changed files with 59 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
|||
# Copyright 2015, 2016 OpenMarket Ltd
|
||||
# Copyright 2017 New Vector Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -238,6 +239,28 @@ BASE_APPEND_OVERRIDE_RULES = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'rule_id': 'global/underride/.m.rule.channelnotif',
|
||||
'conditions': [
|
||||
{
|
||||
'kind': 'event_match',
|
||||
'key': 'content.body',
|
||||
'pattern': '*@channel*',
|
||||
'_id': '_channelnotif_content',
|
||||
},
|
||||
{
|
||||
'kind': 'sender_power_level',
|
||||
'is': '>=50',
|
||||
'_id': '_channelnotif_pl',
|
||||
},
|
||||
],
|
||||
'actions': [
|
||||
'notify', {
|
||||
'set_tweak': 'highlight',
|
||||
'value': True,
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue