mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-25 18:14:27 +01:00
@@ -34,6 +34,9 @@ public class FinishLinkCommand implements JsonRpcMultiCommand<FinishLinkCommand.
|
||||
public void handleCommand(
|
||||
final FinishLinkParams request, final MultiAccountManager m, final JsonWriter jsonWriter
|
||||
) throws CommandException {
|
||||
if (request.deviceLinkUri() == null) {
|
||||
throw new UserErrorException("Missing deviceLinkUri.");
|
||||
}
|
||||
final URI deviceLinkUri;
|
||||
try {
|
||||
deviceLinkUri = new URI(request.deviceLinkUri());
|
||||
@@ -71,7 +74,7 @@ public class FinishLinkCommand implements JsonRpcMultiCommand<FinishLinkCommand.
|
||||
jsonWriter.write(new JsonFinishLink(number));
|
||||
}
|
||||
|
||||
record FinishLinkParams(String deviceLinkUri, String deviceName) {}
|
||||
public record FinishLinkParams(String deviceLinkUri, String deviceName) {}
|
||||
|
||||
private record JsonFinishLink(String number) {}
|
||||
}
|
||||
|
||||
@@ -112,5 +112,5 @@ public class ReceiveCommand implements LocalCommand, JsonRpcSingleCommand<Receiv
|
||||
}
|
||||
}
|
||||
|
||||
record ReceiveParams(Double timeout, Integer maxMessages) {}
|
||||
public record ReceiveParams(Double timeout, Integer maxMessages) {}
|
||||
}
|
||||
|
||||
@@ -97,5 +97,5 @@ public class RegisterCommand implements RegistrationCommand, JsonRpcRegistration
|
||||
}
|
||||
}
|
||||
|
||||
record RegistrationParams(Boolean voice, String captcha) {}
|
||||
public record RegistrationParams(Boolean voice, String captcha) {}
|
||||
}
|
||||
|
||||
@@ -77,5 +77,5 @@ public class VerifyCommand implements RegistrationCommand, JsonRpcRegistrationCo
|
||||
}
|
||||
}
|
||||
|
||||
record VerifyParams(String verificationCode, String pin) {}
|
||||
public record VerifyParams(String verificationCode, String pin) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user