From 458782bf67ef7c188af752b0f455d4a0f9f4cdd5 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 16 Feb 2016 18:00:30 +0000 Subject: Fix typo in request validation for adding push rules. --- synapse/rest/client/v1/push_rule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'synapse/rest/client') diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py index 96633a176c..7766b8be1d 100644 --- a/synapse/rest/client/v1/push_rule.py +++ b/synapse/rest/client/v1/push_rule.py @@ -400,7 +400,7 @@ def _filter_ruleset_with_path(ruleset, path): def _priority_class_from_spec(spec): if spec['template'] not in PRIORITY_CLASS_MAP.keys(): - raise InvalidRuleException("Unknown template: %s" % (spec['kind'])) + raise InvalidRuleException("Unknown template: %s" % (spec['template'])) pc = PRIORITY_CLASS_MAP[spec['template']] if spec['scope'] == 'device': -- cgit 1.4.1 From 71d5d2c669139305b829bdfdbd403a0b8a52b66f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 17 Feb 2016 11:52:30 +0100 Subject: client/v1/room: include event_id in response to state event PUT, in accordance with the spec Signed-off-by: Patrik Oldsberg --- synapse/rest/client/v1/room.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse/rest/client') diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index d3c1b359a2..24706f9383 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -150,11 +150,11 @@ class RoomStateEventRestServlet(ClientV1RestServlet): event_dict["state_key"] = state_key msg_handler = self.handlers.message_handler - yield msg_handler.create_and_send_event( + event = yield msg_handler.create_and_send_event( event_dict, token_id=requester.access_token_id, txn_id=txn_id, ) - defer.returnValue((200, {})) + defer.returnValue((200, {"event_id": event.event_id})) # TODO: Needs unit testing for generic events + feedback -- cgit 1.4.1