mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Can disconnect current user from all his devices
This commit is contained in:
@ -139,4 +139,12 @@ class AccountHelper {
|
||||
if (_currentUserID == -1) throw "Current user ID has not been loaded yet!";
|
||||
return _currentUserID;
|
||||
}
|
||||
|
||||
/// Disconnect all the devices of the current user
|
||||
///
|
||||
/// Throws in case of failure
|
||||
static Future<void> disconnectAllDevices() async {
|
||||
await APIRequest(uri: "account/disconnect_all_devices", needLogin: true)
|
||||
.execWithThrow();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user