mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-09 22:52:34 -04:00
Delete stale non-e2e devices for users, take 3 (#15183)
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.
This commit is contained in:
parent
d0541e36c0
commit
78cdb72cd6
7 changed files with 134 additions and 7 deletions
|
@ -485,7 +485,7 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
device_ids = [d for d in device_ids if d != except_device_id]
|
||||
await self.delete_devices(user_id, device_ids)
|
||||
|
||||
async def delete_devices(self, user_id: str, device_ids: List[str]) -> None:
|
||||
async def delete_devices(self, user_id: str, device_ids: StrCollection) -> None:
|
||||
"""Delete several devices
|
||||
|
||||
Args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue