mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 23:15:02 -04:00
POC delete stale non-e2e devices for users (#14038)
This should help reduce the number of devices e.g. simple bots the repeatedly login rack up. We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
This commit is contained in:
parent
72f3e38137
commit
c7e29ca277
5 changed files with 83 additions and 4 deletions
|
@ -169,6 +169,8 @@ class ClientIpStoreTestCase(unittest.HomeserverTestCase):
|
|||
)
|
||||
)
|
||||
|
||||
last_seen = self.clock.time_msec()
|
||||
|
||||
if after_persisting:
|
||||
# Trigger the storage loop
|
||||
self.reactor.advance(10)
|
||||
|
@ -189,7 +191,7 @@ class ClientIpStoreTestCase(unittest.HomeserverTestCase):
|
|||
"device_id": device_id,
|
||||
"ip": None,
|
||||
"user_agent": None,
|
||||
"last_seen": None,
|
||||
"last_seen": last_seen,
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue