mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-30 02:54:19 +01:00
Removing linked devices only works on the primary device
This commit is contained in:
@@ -140,7 +140,7 @@ public interface Manager extends Closeable {
|
||||
|
||||
List<Device> getLinkedDevices() throws IOException;
|
||||
|
||||
void removeLinkedDevices(int deviceId) throws IOException;
|
||||
void removeLinkedDevices(int deviceId) throws IOException, NotPrimaryDeviceException;
|
||||
|
||||
void addDeviceLink(DeviceLinkUrl linkUri) throws IOException, InvalidDeviceLinkException, NotPrimaryDeviceException;
|
||||
|
||||
|
||||
@@ -436,7 +436,10 @@ public class ManagerImpl implements Manager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeLinkedDevices(int deviceId) throws IOException {
|
||||
public void removeLinkedDevices(int deviceId) throws IOException, NotPrimaryDeviceException {
|
||||
if (!account.isPrimaryDevice()) {
|
||||
throw new NotPrimaryDeviceException();
|
||||
}
|
||||
context.getAccountHelper().removeLinkedDevices(deviceId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user