Fix logging errors when receiving invalid User ID for key querys (#17250)
This commit is contained in:
parent
7dd14fadb1
commit
64f5a4a353
|
@ -0,0 +1 @@
|
|||
Stop logging errors when receiving invalid User IDs in key querys requests.
|
|
@ -149,6 +149,11 @@ class E2eKeysHandler:
|
|||
remote_queries = {}
|
||||
|
||||
for user_id, device_ids in device_keys_query.items():
|
||||
if not UserID.is_valid(user_id):
|
||||
# Ignore invalid user IDs, which is the same behaviour as if
|
||||
# the user existed but had no keys.
|
||||
continue
|
||||
|
||||
# we use UserID.from_string to catch invalid user ids
|
||||
if self.is_mine(UserID.from_string(user_id)):
|
||||
local_query[user_id] = device_ids
|
||||
|
|
Loading…
Reference in New Issue