mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:06:05 -04:00
Wrap calls to distributor.fire in appropriately named functions so that static analysis can work out want is calling what
This commit is contained in:
parent
a2922bb944
commit
a9526831a4
7 changed files with 78 additions and 53 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue