diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-12-01 20:53:04 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-12-01 20:53:04 +0000 |
commit | a9526831a45403d3da8165f7832cefc61282723c (patch) | |
tree | 15c28007a499e2baf93dd7c101f48a4909b14aa3 /synapse/handlers/message.py | |
parent | Merge pull request #392 from matrix-org/markjh/client_config (diff) | |
download | synapse-a9526831a45403d3da8165f7832cefc61282723c.tar.xz |
Wrap calls to distributor.fire in appropriately named functions so that static analysis can work out want is calling what
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 10 |
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: |