mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-24 20:40:26 -04:00
Consolidate the logic of delete_device/delete_devices. (#12970)
By always using delete_devices and sometimes passing a list with a single device ID. Previously these methods had gotten out of sync with each other and it seems there's little benefit to the single-device variant.
This commit is contained in:
parent
c51f5b9592
commit
9dc3293e0b
8 changed files with 12 additions and 48 deletions
|
@ -1433,16 +1433,6 @@ class DeviceStore(DeviceWorkerStore, DeviceBackgroundUpdateStore):
|
|||
)
|
||||
raise StoreError(500, "Problem storing device.")
|
||||
|
||||
async def delete_device(self, user_id: str, device_id: str) -> None:
|
||||
"""Delete a device and its device_inbox.
|
||||
|
||||
Args:
|
||||
user_id: The ID of the user which owns the device
|
||||
device_id: The ID of the device to delete
|
||||
"""
|
||||
|
||||
await self.delete_devices(user_id, [device_id])
|
||||
|
||||
async def delete_devices(self, user_id: str, device_ids: List[str]) -> None:
|
||||
"""Deletes several devices.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue