diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-04-08 09:51:36 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-04-08 09:51:36 +0100 |
commit | b4a5002a6e5d5e2525b7af3f8fdda4fed29d8f48 (patch) | |
tree | 870e8e64c233d3b82d3e6a28ac7477857995bcb3 /synapse/handlers/message.py | |
parent | Merge pull request #701 from DoubleMalt/ldap-auth (diff) | |
parent | Call profile handler get_displayname directly rather than using collect_prese... (diff) | |
download | synapse-b4a5002a6e5d5e2525b7af3f8fdda4fed29d8f48.tar.xz |
Merge pull request #708 from matrix-org/markjh/remove_collect_presencelike_data
Call profile handler get_displayname directly
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 10 |
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 |