mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-21 15:18:48 -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
|
@ -799,7 +799,7 @@ class ModuleApi:
|
|||
if device_id:
|
||||
# delete the device, which will also delete its access tokens
|
||||
yield defer.ensureDeferred(
|
||||
self._hs.get_device_handler().delete_device(user_id, device_id)
|
||||
self._hs.get_device_handler().delete_devices(user_id, [device_id])
|
||||
)
|
||||
else:
|
||||
# no associated device. Just delete the access token.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue