mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-09-23 06:39:04 +00:00
Merge remote-tracking branch 'upstream/master' into feat/numberless-linking
This commit is contained in:
commit
721312189a
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user