diff options
author | David Robertson <davidr@element.io> | 2022-09-06 14:29:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-06 14:29:16 +0100 |
commit | a4ecb8e35309d780f5d4e93fb4998b90c9068e8a (patch) | |
tree | 7628cfa6369909afadcccc423d8185ecb03fb32e /synapse/api | |
parent | Update trial old deps CI to use poetry 1.2.0 (#13707) (diff) | |
download | synapse-a4ecb8e35309d780f5d4e93fb4998b90c9068e8a.tar.xz |
Actually fix typechecking with latest types-jsonschema (#13724)
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/filtering.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py index 102889ac49..f7f46f8d80 100644 --- a/synapse/api/filtering.py +++ b/synapse/api/filtering.py @@ -140,13 +140,13 @@ USER_FILTER_SCHEMA = { @FormatChecker.cls_checks("matrix_room_id") -def matrix_room_id_validator(room_id_str: str) -> bool: - return RoomID.is_valid(room_id_str) +def matrix_room_id_validator(room_id: object) -> bool: + return isinstance(room_id, str) and RoomID.is_valid(room_id) @FormatChecker.cls_checks("matrix_user_id") -def matrix_user_id_validator(user_id_str: str) -> bool: - return UserID.is_valid(user_id_str) +def matrix_user_id_validator(user_id: object) -> bool: + return isinstance(user_id, str) and UserID.is_valid(user_id) class Filtering: |