diff options
author | Erik Johnston <erik@matrix.org> | 2014-12-08 14:50:48 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-12-08 14:50:48 +0000 |
commit | ee3df06183cbebfe04f51cdd3a1a85a6b50efa9a (patch) | |
tree | 79240d0f78e800a9c327a5dd0df37ddfbb4a9729 /synapse/handlers/message.py | |
parent | Remove unused import (diff) | |
download | synapse-ee3df06183cbebfe04f51cdd3a1a85a6b50efa9a.tar.xz |
More bug fixes
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 12 |
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, ) |