summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-08 14:50:48 +0000
committerErik Johnston <erik@matrix.org>2014-12-08 14:50:48 +0000
commitee3df06183cbebfe04f51cdd3a1a85a6b50efa9a (patch)
tree79240d0f78e800a9c327a5dd0df37ddfbb4a9729 /synapse/handlers/message.py
parentRemove unused import (diff)
downloadsynapse-ee3df06183cbebfe04f51cdd3a1a85a6b50efa9a.tar.xz
More bug fixes
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 485d8e8179..8ee560d79a 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -137,6 +137,18 @@ class MessageHandler(BaseHandler):
     def handle_event(self, event_dict):
         builder = self.event_builder_factory.new(event_dict)
 
+
+        if builder.type == EventTypes.Member:
+            membership = builder.content.get("membership", None)
+            if membership == Membership.JOIN:
+                joinee = self.hs.parse_userid(builder.state_key)
+                # If event doesn't include a display name, add one.
+                yield self.distributor.fire(
+                    "collect_presencelike_data",
+                    joinee,
+                    builder.content
+                )
+
         event, context = yield self._create_new_client_event(
             builder=builder,
         )