Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Added type hint for member_linearizer (fixed mypy error)
Browse files Browse the repository at this point in the history
Not sure why this was neccessary! Without it it produces an error
for line 811 of `synapse/handlers/room.py`
  • Loading branch information
Azrenbeth authored and Azrenbeth committed Aug 19, 2021
1 parent f6bb4a1 commit e12d9ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synapse/handlers/room_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __init__(self, hs: "HomeServer"):
self.account_data_handler = hs.get_account_data_handler()
self.event_auth_handler = hs.get_event_auth_handler()

self.member_linearizer = Linearizer(name="member")
self.member_linearizer: Linearizer = Linearizer(name="member")

self.clock = hs.get_clock()
self.spam_checker = hs.get_spam_checker()
Expand Down Expand Up @@ -558,6 +558,8 @@ async def update_membership_locked(
# global profile.
content.pop("displayname", None)
content.pop("avatar_url", None)
# content may now be emtpy
content_specified = len(content) == 0

effective_membership_state = action
if action in ["kick", "unban"]:
Expand Down

0 comments on commit e12d9ec

Please sign in to comment.