mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/server_refactor
This commit is contained in:
commit
e4e33c743e
@ -173,6 +173,12 @@ BASE_APPEND_UNDERRIDE_RULES = [
|
|||||||
'kind': 'room_member_count',
|
'kind': 'room_member_count',
|
||||||
'is': '2',
|
'is': '2',
|
||||||
'_id': 'member_count',
|
'_id': 'member_count',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'kind': 'event_match',
|
||||||
|
'key': 'type',
|
||||||
|
'pattern': 'm.room.message',
|
||||||
|
'_id': '_message',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'actions': [
|
'actions': [
|
||||||
|
@ -52,7 +52,7 @@ class PushRuleRestServlet(ClientV1RestServlet):
|
|||||||
content = _parse_json(request)
|
content = _parse_json(request)
|
||||||
|
|
||||||
if 'attr' in spec:
|
if 'attr' in spec:
|
||||||
self.set_rule_attr(requester.user.to_string(), spec, content)
|
yield self.set_rule_attr(requester.user.to_string(), spec, content)
|
||||||
defer.returnValue((200, {}))
|
defer.returnValue((200, {}))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -228,7 +228,7 @@ class PushRuleRestServlet(ClientV1RestServlet):
|
|||||||
# bools directly, so let's not break them.
|
# bools directly, so let's not break them.
|
||||||
raise SynapseError(400, "Value for 'enabled' must be boolean")
|
raise SynapseError(400, "Value for 'enabled' must be boolean")
|
||||||
namespaced_rule_id = _namespaced_rule_id_from_spec(spec)
|
namespaced_rule_id = _namespaced_rule_id_from_spec(spec)
|
||||||
self.hs.get_datastore().set_push_rule_enabled(
|
return self.hs.get_datastore().set_push_rule_enabled(
|
||||||
user_id, namespaced_rule_id, val
|
user_id, namespaced_rule_id, val
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user