diff options
author | Erik Johnston <erik@matrix.org> | 2014-12-15 17:01:12 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-12-15 17:01:12 +0000 |
commit | cf6e5f1dbf3cecf693e45f293535e71ee31801ed (patch) | |
tree | ea0f29cfd9168f1d1a7030ca66372cd42df64eb8 /synapse/handlers/message.py | |
parent | Remove unused functions (diff) | |
download | synapse-cf6e5f1dbf3cecf693e45f293535e71ee31801ed.tar.xz |
Rename MessageHandler.handle_event. Add a few comments.
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 4fa4ffea25..1eed38c6d1 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -138,7 +138,19 @@ class MessageHandler(BaseHandler): defer.returnValue(chunk) @defer.inlineCallbacks - def handle_event(self, event_dict): + def create_and_send_event(self, event_dict): + """ Given a dict from a client, create and handle a new event. + + Creates an FrozenEvent object, filling out auth_events, prev_events, + etc. + + Adds display names to Join membership events. + + Persists and notifies local clients and federation. + + Args: + event_dict (dict): An entire event + """ builder = self.event_builder_factory.new(event_dict) self.validator.validate_new(builder) |