mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 14:56:42 -04:00
Actually auth-check to ensure people can only send typing notifications for rooms they're actually in
This commit is contained in:
parent
966c4b2b04
commit
5ebc994f84
2 changed files with 14 additions and 0 deletions
|
@ -67,6 +67,8 @@ class TypingNotificationHandler(BaseHandler):
|
|||
if target_user != auth_user:
|
||||
raise AuthError(400, "Cannot set another user's typing state")
|
||||
|
||||
yield self.auth.check_joined_room(room_id, target_user.to_string())
|
||||
|
||||
logger.debug(
|
||||
"%s has started typing in %s", target_user.to_string(), room_id
|
||||
)
|
||||
|
@ -102,6 +104,8 @@ class TypingNotificationHandler(BaseHandler):
|
|||
if target_user != auth_user:
|
||||
raise AuthError(400, "Cannot set another user's typing state")
|
||||
|
||||
yield self.auth.check_joined_room(room_id, target_user.to_string())
|
||||
|
||||
logger.debug(
|
||||
"%s has stopped typing in %s", target_user.to_string(), room_id
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue