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

Commit d9dd127

Browse files
David RobertsonH-Shay
authored andcommitted
Fix UndefinedColumn: column "key_json" does not exist errors when handling users with more than 50 non-E2E devices (#14580)
1 parent de94621 commit d9dd127

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

synapse/storage/databases/main/devices.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,7 @@ async def check_too_many_devices_for_user(self, user_id: str) -> Collection[str]
15591559
# that ensures we keep at most 50 devices.
15601560
sql = """
15611561
SELECT last_seen FROM devices
1562+
LEFT JOIN e2e_device_keys_json USING (user_id, device_id)
15621563
WHERE
15631564
user_id = ?
15641565
AND NOT hidden

0 commit comments

Comments
 (0)