summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-12-02 09:44:56 +0000
committerMark Haines <mjark@negativecurvature.net>2015-12-02 09:44:56 +0000
commit9fbd504b4e56aa1be6c5bb611fb97dfe9f4baa9a (patch)
tree9862b08457b47628d0b8c2c8b18afa7bf987511d /synapse/handlers/message.py
parentMerge pull request #406 from matrix-org/erikj/search (diff)
parentMerge branch 'develop' into markjh/distributor_facade (diff)
downloadsynapse-9fbd504b4e56aa1be6c5bb611fb97dfe9f4baa9a.tar.xz
Merge pull request #408 from matrix-org/markjh/distributor_facade
Wrap calls to distributor.fire in appropriately named functions 
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index e959ce50be..cb0361ac49 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -31,6 +31,10 @@ import logging
 logger = logging.getLogger(__name__)
 
 
+def collect_presencelike_data(distributor, user, content):
+    return distributor.fire("changed_presencelike_data", user, content)
+
+
 class MessageHandler(BaseHandler):
 
     def __init__(self, hs):
@@ -195,10 +199,8 @@ class MessageHandler(BaseHandler):
             if membership == Membership.JOIN:
                 joinee = UserID.from_string(builder.state_key)
                 # If event doesn't include a display name, add one.
-                yield self.distributor.fire(
-                    "collect_presencelike_data",
-                    joinee,
-                    builder.content
+                yield collect_presencelike_data(
+                    self.distributor, joinee, builder.content
                 )
 
         if token_id is not None: