Commit Graph

68 Commits

Author SHA1 Message Date
Šimon Brandner 042e47970b
Remove `dont_notify` from the `.m.rule.room.server_acl` rule (#12849)
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2022-05-24 17:42:32 +01:00
Patrick Cloke 88ce3080d4
Experimental support for MSC3772 (#12740)
Implements the following behind an experimental configuration flag:

* A new push rule kind for mutually related events.
* A new default push rule (`.m.rule.thread_reply`) under an unstable prefix.

This is missing part of MSC3772:

* The `.m.rule.thread_reply_to_me` push rule, this depends on MSC3664 / #11804.
2022-05-24 13:23:23 +00:00
Šimon Brandner ade3008821
Implement MSC3786: Add a default push rule to ignore m.room.server_acl events (#12601)
Fixes vector-im/element-web#20788
Implements matrix-org/matrix-spec-proposals#3786
2022-05-10 08:57:36 +01:00
Nick Mills-Barrett 735e89bd3a
Add an additional HTTP pusher + push rule tests. (#12188)
And rename the field used for caching from _id to _cache_key.
2022-03-11 08:45:26 -05:00
Sean Quah e6acd3cf4f
Upgrade mypy to version 0.931 (#12030)
Upgrade mypy to 0.931, mypy-zope to 0.3.5 and fix new complaints.
2022-02-18 15:57:26 +00:00
Patrick Cloke acda9f07c8
Revert experimental push rules from #7997. (#11884)
Manually reverts the merge from cdbb8e6d6e.
2022-02-02 09:49:31 -05:00
Patrick Cloke 5d34f40d49
Add type hints to the push module. (#8901) 2020-12-11 11:43:53 -05:00
David Baker 59cc2472b3
Add base pushrule to notify for jitsi conferences (#8286)
This could be customised to trigger a different kind of notification in the future, but for now it's a normal non-highlight one.
2020-11-02 16:36:14 +00:00
Patrick Cloke 34a5696f93
Fix typos and spelling errors. (#8639) 2020-10-23 12:38:40 -04:00
Brendan Abolivier dd11f575a2
Incorporate review 2020-08-06 10:52:26 +01:00
Brendan Abolivier 60328ce9fb
Lint 2020-07-30 19:02:28 +01:00
Brendan Abolivier 9725c59247
Implement new experimental push rules with a database hack to enable them 2020-07-28 19:20:55 +01:00
Erik Johnston 2e697d3013 Explicitly check that tombstone is a state event before notifying. 2019-07-31 16:32:03 +01:00
J. Ryan Stinnett 9b1b79f3f5
Add default push rule to ignore reactions (#5623)
This adds a default push rule following the proposal in
[MSC2153](https://github.com/matrix-org/matrix-doc/pull/2153).

See also https://github.com/vector-im/riot-web/issues/10208
See also https://github.com/matrix-org/matrix-js-sdk/pull/976
2019-07-05 17:37:52 +01:00
Amber Brown 32e7c9e7f2
Run Black. (#5482) 2019-06-20 19:32:02 +10:00
Travis Ralston 8c5b1e30d4
Add a default .m.rule.tombstone push rule (#4867)
* Add a default .m.rule.tombstone push rule

In support of MSC1930: https://github.com/matrix-org/matrix-doc/pull/1930

* changelog

* Appease the changelog linter
2019-04-29 15:40:31 -06:00
Amber Brown 49af402019 run isort 2018-07-09 16:09:20 +10:00
Amber Brown c936a52a9e
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (#3307) 2018-05-31 19:03:47 +10:00
David Baker 9342bcfce0 Omit the *s for @room notifications
They're just redundant
2017-10-16 13:38:10 +01:00
David Baker 0f1eb3e914 Use notification levels in power_levels
Rather than making the condition directly require a specific power
level. This way the level require to notify a room can be configured
per room.
2017-10-10 15:23:00 +01:00
David Baker 985ce80375 They're called rooms 2017-10-05 13:03:44 +01:00
David Baker b9b9714fd5 Get rule type right 2017-10-05 13:02:19 +01:00
David Baker fa969cfdde Support for channel notifications
Add condition type to check the sender's power level and add a base
rule using it for @channel notifications.
2017-10-05 12:39:18 +01:00
Erik Johnston 49cf205dc7 _id field must uniquely identify different conditions 2016-09-19 10:34:01 +01:00
Matthew Hodgson 3f6ec271ba proposal for notifying on e2e events 2016-09-17 22:05:06 +01:00
David Baker 1594eba29e s/underride/override/ in the rule_id too 2016-08-16 16:44:07 +01:00
David Baker 1c7c317df1 Move display name rule
As per https://github.com/matrix-org/matrix-doc/pull/373 and comment
2016-08-15 18:34:53 +01:00
Mark Haines 790f5848b2 Fix the rule_id for .m.rule.invite_for_me (#715) 2016-04-11 16:10:39 +01:00
David Baker ed3979df5f Fix invite pushes
* If the event is an invite event, add the invitee to list of user we run push rules for (if they have a pusher etc)
 * Move invite_for_me to be higher prio than member events otherwise member events matches them
 * Spell override right
2016-04-08 15:29:59 +01:00
Mark Haines 2a37467fa1 Use google style doc strings.
pycharm supports them so there is no need to use the other format.

Might as well convert the existing strings to reduce the risk of
people accidentally cargo culting the wrong doc string format.
2016-04-01 16:12:07 +01:00
David Baker 3b554bda26 Never notify for member events. This fixes https://github.com/vector-im/vector-web/issues/828 2016-03-24 13:19:39 +00:00
Mark Haines de27f7fc79 Add support for changing the actions for default rules
See matrix-org/matrix-doc#283

Works by adding dummy rules to the push rules table with a negative priority class and then using those rules to clobber the default rule actions when adding the default rules in ``list_with_base_rules``
2016-02-26 14:28:19 +00:00
David Baker 766c24b2e6 Only notify for messages in one to one rooms, not every event
Fixes the fact that candidate events and hangups generated notifications.
2016-01-26 10:21:41 +00:00
David Baker 930ba003f8 Remove member event rule as per SYN-607 2016-01-21 11:50:27 +00:00
Erik Johnston 9a8949f022 Merge branch 'develop' of github.com:matrix-org/synapse into default_notify 2016-01-19 11:37:05 +00:00
Erik Johnston f750a442f7 Update _id 2016-01-19 10:14:53 +00:00
Erik Johnston 866fe27e78 Do for loop once at start 2016-01-18 15:29:41 +00:00
Erik Johnston d1f56f732e Use static for const dicts 2016-01-18 15:17:56 +00:00
Mark Haines 9c1f853d58 Rename 'user_name' to 'user_id' in push to make it consistent with the rest of the code 2016-01-13 13:32:59 +00:00
David Baker d9db819e23 Change default pushrules back to notifying for all messages. 2016-01-13 13:15:53 +00:00
Matthew Hodgson 6c28ac260c copyrights 2016-01-07 04:26:29 +00:00
David Baker 4b1281f9b7 Change the m.room.message rule to be disabled by default so we only notify for 1:1 rooms / highlights out-of-the-box 2015-12-02 11:26:49 +00:00
David Baker 6825eef955 Oops: underride rule had an identifier with override in it. 2015-06-23 14:26:14 +01:00
David Baker ed83638668 Make one-to-one rule an underride otherwise bings don't work in one-to-one wrooms. Likewise a couple of other rules. 2015-04-24 14:27:17 +01:00
Mark Haines 4e2f8b8722 Copyright notices 2015-04-24 10:35:29 +01:00
David Baker 465354ffde 'false' is not False 2015-03-11 11:24:50 +00:00
David Baker 83b1e7fb3c PEP8 blank lines 2015-03-11 10:01:17 +00:00
David Baker 04f8478aaa Add the master push rule for the break-my-push button. Allow server default rules to be disabled by default. 2015-03-10 17:26:25 +00:00
David Baker 1df3ccf7ee D'oh: underscore, not hyphen 2015-03-09 12:39:56 +00:00
David Baker 118c883429 Call notifications should be override else they'll get clobbered by sender/room rules. 2015-03-06 19:41:36 +00:00