summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-04-07 18:11:49 +0100
committerMark Haines <mark.haines@matrix.org>2016-04-07 18:11:49 +0100
commit86be915ccef824176b4aa127e5d62d30e00bb6b7 (patch)
tree6b0b15777616c567bbb462115989fd479f808341 /synapse/handlers/message.py
parentMerge pull request #704 from matrix-org/markh/slaveIII (diff)
downloadsynapse-86be915ccef824176b4aa127e5d62d30e00bb6b7.tar.xz
Call profile handler get_displayname directly rather than using collect_presencelike_data
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 10608c0dd9..fa78d4acec 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -34,10 +34,6 @@ import logging
 logger = logging.getLogger(__name__)
 
 
-def collect_presencelike_data(distributor, user, content):
-    return distributor.fire("collect_presencelike_data", user, content)
-
-
 class MessageHandler(BaseHandler):
 
     def __init__(self, hs):
@@ -202,12 +198,8 @@ class MessageHandler(BaseHandler):
             membership = builder.content.get("membership", None)
             target = UserID.from_string(builder.state_key)
 
-            if membership == Membership.JOIN:
+            if membership in {Membership.JOIN, Membership.INVITE}:
                 # If event doesn't include a display name, add one.
-                yield collect_presencelike_data(
-                    self.distributor, target, builder.content
-                )
-            elif membership == Membership.INVITE:
                 profile = self.hs.get_handlers().profile_handler
                 content = builder.content