summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-15 17:01:12 +0000
committerErik Johnston <erik@matrix.org>2014-12-15 17:01:12 +0000
commitcf6e5f1dbf3cecf693e45f293535e71ee31801ed (patch)
treeea0f29cfd9168f1d1a7030ca66372cd42df64eb8 /synapse/rest
parentRemove unused functions (diff)
downloadsynapse-cf6e5f1dbf3cecf693e45f293535e71ee31801ed.tar.xz
Rename MessageHandler.handle_event. Add a few comments.
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/room.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/rest/room.py b/synapse/rest/room.py
index 25ee964555..1a527d27c1 100644
--- a/synapse/rest/room.py
+++ b/synapse/rest/room.py
@@ -157,7 +157,7 @@ class RoomStateEventRestServlet(RestServlet):
             event_dict["state_key"] = state_key
 
         msg_handler = self.handlers.message_handler
-        yield msg_handler.handle_event(event_dict)
+        yield msg_handler.create_and_send_event(event_dict)
 
         defer.returnValue((200, {}))
 
@@ -176,7 +176,7 @@ class RoomSendEventRestServlet(RestServlet):
         content = _parse_json(request)
 
         msg_handler = self.handlers.message_handler
-        event = yield msg_handler.handle_event(
+        event = yield msg_handler.create_and_send_event(
             {
                 "type": event_type,
                 "content": content,
@@ -237,7 +237,7 @@ class JoinRoomAliasServlet(RestServlet):
             defer.returnValue((200, ret_dict))
         else:  # room id
             msg_handler = self.handlers.message_handler
-            yield msg_handler.handle_event(
+            yield msg_handler.create_and_send_event(
                 {
                     "type": RoomMemberEvent.TYPE,
                     "content": {"membership": Membership.JOIN},
@@ -401,7 +401,7 @@ class RoomMembershipRestServlet(RestServlet):
                 membership_action = "leave"
 
         msg_handler = self.handlers.message_handler
-        yield msg_handler.handle_event(
+        yield msg_handler.create_and_send_event(
             {
                 "type": RoomMemberEvent.TYPE,
                 "content": {"membership": unicode(membership_action)},
@@ -439,7 +439,7 @@ class RoomRedactEventRestServlet(RestServlet):
         content = _parse_json(request)
 
         msg_handler = self.handlers.message_handler
-        event = yield msg_handler.handle_event(
+        event = yield msg_handler.create_and_send_event(
             {
                 "type": RoomRedactionEvent.TYPE,
                 "content": content,