Merge remote-tracking branch 'upstream/master' into feat/numberless-linking

This commit is contained in:
Mariusz Woloszyn 2026-09-20 15:16:32 +00:00
commit 721312189a
3 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,19 @@
package org.asamk.signal.manager.api;
import org.signal.libsignal.net.BadRequestError;
import java.io.IOException;
public class BadRequestException extends IOException {
private final BadRequestError error;
public BadRequestException(final BadRequestError error) {
super(error.toString());
this.error = error;
}
public BadRequestError getError() {
return error;
}
}

View File

@ -1,5 +1,6 @@
package org.asamk.signal.manager.util;
import org.asamk.signal.manager.api.BadRequestException;
import org.asamk.signal.manager.api.Pair;
import org.signal.core.models.ServiceId;
import org.signal.libsignal.net.BadRequestError;
@ -194,8 +195,8 @@ public class Utils {
}
} else if (result instanceof RequestResult.RetryableNetworkError e) {
throw e.getNetworkError();
} else if (result instanceof RequestResult.NonSuccess) {
throw new AssertionError();
} else if (result instanceof RequestResult.NonSuccess<?> e) {
throw new BadRequestException(e.getError());
}
throw new IllegalStateException("Unexpected value: " + result);
}

View File

@ -248,7 +248,8 @@ Remove the registration lock pin.
Link to an existing device, instead of registering a new number.
This shows a "sgnl://linkdevice?uuid=..." URI.
If you want to connect to another signal-cli instance, you can just use this URI.
If you want to link to an Android/iOS device, create a QR code with the URI (e.g. with qrencode) and scan that in the Signal app.
If you want to link to an Android/iOS device, scan the QR code that signal-cli prints in the terminal with the Signal app.
If signal-cli is not running in a terminal, only the URI is printed and you can create a QR code from it yourself (e.g. with qrencode).
*-n* NAME, *--name* NAME::
Optionally specify a name to describe this new device.