import org.asamk.signal.BaseConfig;
import org.asamk.signal.manager.Manager;
import org.asamk.signal.manager.api.AttachmentInvalidException;
+import org.asamk.signal.manager.api.CaptchaRejectedException;
import org.asamk.signal.manager.api.DeviceLinkUrl;
import org.asamk.signal.manager.api.GroupId;
import org.asamk.signal.manager.api.GroupInviteLinkUrl;
m.submitRateLimitRecaptchaChallenge(challenge, captcha);
} catch (IOException e) {
throw new Error.Failure("Submit challenge error: " + e.getMessage());
+ } catch (CaptchaRejectedException e) {
+ throw new Error.Failure(
+ "Captcha rejected, it may be outdated, already used or solved from a different IP address.");
}
-
}
@Override
try {
m.removeLinkedDevices(device.id());
updateDevices();
+ } catch (NotPrimaryDeviceException e) {
+ throw new Error.Failure("This command doesn't work on linked devices.");
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
}
throw new Error.Failure("Only the name of this device can be changed");
}
try {
- m.updateAccountAttributes(name, null);
+ m.updateAccountAttributes(name, null, null, null);
// update device list
updateDevices();
} catch (IOException e) {