summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-12-02 10:40:22 +0000
committerMark Haines <mark.haines@matrix.org>2015-12-02 10:40:22 +0000
commit2a0ec3b89d6b97e8a91ef5320d5e6675acacffdd (patch)
treebc022d01b40c2fdc701d4e1183931217cb6dfd6f /synapse/handlers/message.py
parentOnly fire user_joined_room if the membership has changed (diff)
parentMerge pull request #409 from MadsRC/develop (diff)
downloadsynapse-2a0ec3b89d6b97e8a91ef5320d5e6675acacffdd.tar.xz
Merge branch 'develop' into markjh/edu_frequency
Conflicts:
	synapse/handlers/federation.py
	synapse/handlers/room.py
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: