diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-02-02 09:49:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-02 09:49:31 -0500 |
commit | acda9f07c858902ab072d49f6ad3e26df874d06e (patch) | |
tree | c820ade1021c884c6c99f57a1b955512eae4b1ff /synapse/rest/client | |
parent | Add a background database update to purge account data for deactivated users.... (diff) | |
download | synapse-acda9f07c858902ab072d49f6ad3e26df874d06e.tar.xz |
Revert experimental push rules from #7997. (#11884)
Manually reverts the merge from cdbb8e6d6e36e0b6bc36e676d8fe66c96986b399.
Diffstat (limited to 'synapse/rest/client')
-rw-r--r-- | synapse/rest/client/push_rule.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/synapse/rest/client/push_rule.py b/synapse/rest/client/push_rule.py index 6f796d5e50..8fe75bd750 100644 --- a/synapse/rest/client/push_rule.py +++ b/synapse/rest/client/push_rule.py @@ -29,7 +29,7 @@ from synapse.http.servlet import ( parse_string, ) from synapse.http.site import SynapseRequest -from synapse.push.baserules import BASE_RULE_IDS, NEW_RULE_IDS +from synapse.push.baserules import BASE_RULE_IDS from synapse.push.clientformat import format_push_rules_for_user from synapse.push.rulekinds import PRIORITY_CLASS_MAP from synapse.rest.client._base import client_patterns @@ -61,10 +61,6 @@ class PushRuleRestServlet(RestServlet): self.notifier = hs.get_notifier() self._is_worker = hs.config.worker.worker_app is not None - self._users_new_default_push_rules = ( - hs.config.server.users_new_default_push_rules - ) - async def on_PUT(self, request: SynapseRequest, path: str) -> Tuple[int, JsonDict]: if self._is_worker: raise Exception("Cannot handle PUT /push_rules on worker") @@ -217,12 +213,7 @@ class PushRuleRestServlet(RestServlet): rule_id = spec.rule_id is_default_rule = rule_id.startswith(".") if is_default_rule: - if user_id in self._users_new_default_push_rules: - rule_ids = NEW_RULE_IDS - else: - rule_ids = BASE_RULE_IDS - - if namespaced_rule_id not in rule_ids: + if namespaced_rule_id not in BASE_RULE_IDS: raise SynapseError(404, "Unknown rule %r" % (namespaced_rule_id,)) await self.store.set_push_rule_actions( user_id, namespaced_rule_id, actions, is_default_rule |