mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Removing linked devices only works on the primary device
This commit is contained in:
parent
b76964f219
commit
22ac3cb50f
4 changed files with 11 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue