diff options
author | Travis Ralston <travisr@matrix.org> | 2022-11-28 16:29:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 16:29:53 -0700 |
commit | 3da645032722fbf09c1e5efbc51d8c5c78d8a2cd (patch) | |
tree | 9829bf818b0b6fd0925c6edf003f3d1d1d59bf80 /synapse/push | |
parent | Move MSC3030 `/timestamp_to_event` endpoint to stable v1 location (#14471) (diff) | |
download | synapse-3da645032722fbf09c1e5efbc51d8c5c78d8a2cd.tar.xz |
Initial support for MSC3931: Room version push rule feature flags (#14520)
* Add support for MSC3931: Room Version Supports push rule condition * Create experimental flag for future work, and use it to gate MSC3931 * Changelog entry
Diffstat (limited to 'synapse/push')
-rw-r--r-- | synapse/push/bulk_push_rule_evaluator.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py index 75b7e126ca..9cc3da6d91 100644 --- a/synapse/push/bulk_push_rule_evaluator.py +++ b/synapse/push/bulk_push_rule_evaluator.py @@ -338,6 +338,10 @@ class BulkPushRuleEvaluator: for user_id, level in notification_levels.items(): notification_levels[user_id] = int(level) + room_version_features = event.room_version.msc3931_push_features + if not room_version_features: + room_version_features = [] + evaluator = PushRuleEvaluator( _flatten_dict(event), room_member_count, @@ -345,6 +349,8 @@ class BulkPushRuleEvaluator: notification_levels, related_events, self._related_event_match_enabled, + room_version_features, + self.hs.config.experimental.msc1767_enabled, # MSC3931 flag ) users = rules_by_user.keys() |