X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/f4ed9a01b728272f2a3ba1790ec784fc4f4d7796..80e15ad54eff0d0552bea1db45208a6b80c19e16:/src/main/java/org/asamk/signal/manager/Manager.java diff --git a/src/main/java/org/asamk/signal/manager/Manager.java b/src/main/java/org/asamk/signal/manager/Manager.java index 3642d6db..b8a0f57b 100644 --- a/src/main/java/org/asamk/signal/manager/Manager.java +++ b/src/main/java/org/asamk/signal/manager/Manager.java @@ -415,6 +415,9 @@ public class Manager implements Closeable { } public void setRegistrationLockPin(Optional pin) throws IOException, UnauthenticatedResponseException { + if (!account.isMasterDevice()) { + throw new RuntimeException("Only master device can set a PIN"); + } if (pin.isPresent()) { final MasterKey masterKey = account.getPinMasterKey() != null ? account.getPinMasterKey()