mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-02 04:16:04 -04:00
Refactor the membership check methods in Auth
these were getting a bit unwieldy, so let's combine `check_joined_room` and `check_user_was_in_room` into a single `check_user_in_room`.
This commit is contained in:
parent
adfaea8c69
commit
b58d17e44f
4 changed files with 46 additions and 73 deletions
|
@ -125,7 +125,7 @@ class TypingHandler(object):
|
|||
if target_user_id != auth_user_id:
|
||||
raise AuthError(400, "Cannot set another user's typing state")
|
||||
|
||||
yield self.auth.check_joined_room(room_id, target_user_id)
|
||||
yield self.auth.check_user_in_room(room_id, target_user_id)
|
||||
|
||||
logger.debug("%s has started typing in %s", target_user_id, room_id)
|
||||
|
||||
|
@ -155,7 +155,7 @@ class TypingHandler(object):
|
|||
if target_user_id != auth_user_id:
|
||||
raise AuthError(400, "Cannot set another user's typing state")
|
||||
|
||||
yield self.auth.check_joined_room(room_id, target_user_id)
|
||||
yield self.auth.check_user_in_room(room_id, target_user_id)
|
||||
|
||||
logger.debug("%s has stopped typing in %s", target_user_id, room_id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue