mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-26 12:16:12 +00:00
Merge pull request #2118 from matrix-org/erikj/no_devices
Fix getting latest device IP for user with no devices
This commit is contained in:
commit
7b41013102
@ -120,6 +120,9 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
|
||||
where_clauses.append("(user_id = ? AND device_id = ?)")
|
||||
bindings.extend((user_id, device_id))
|
||||
|
||||
if not where_clauses:
|
||||
return []
|
||||
|
||||
inner_select = (
|
||||
"SELECT MAX(last_seen) mls, user_id, device_id FROM user_ips "
|
||||
"WHERE %(where)s "
|
||||
|
Loading…
Reference in New Issue
Block a user