X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/a17262d9ff7379c4f1590a3669af52e7237144bb..eee140f74fe9a01972b8d61193c1125c1d89e0df:/src/main/java/org/asamk/signal/util/ErrorUtils.java diff --git a/src/main/java/org/asamk/signal/util/ErrorUtils.java b/src/main/java/org/asamk/signal/util/ErrorUtils.java index ef1956c3..e2454925 100644 --- a/src/main/java/org/asamk/signal/util/ErrorUtils.java +++ b/src/main/java/org/asamk/signal/util/ErrorUtils.java @@ -67,7 +67,17 @@ public class ErrorUtils { } else if (result.getProofRequiredFailure() != null) { final var failure = result.getProofRequiredFailure(); return String.format( - "CAPTCHA proof required for sending to \"%s\", available options \"%s\" with challenge token \"%s\", or wait \"%d\" seconds", + "CAPTCHA proof required for sending to \"%s\", available options \"%s\" with challenge token \"%s\", or wait \"%d\" seconds.\n" + + ( + failure.getOptions().contains(ProofRequiredException.Option.RECAPTCHA) + ? + "To get the captcha token, go to https://signalcaptchas.org/registration/generate.html\n" + + "Check the developer tools (F12) console for a failed redirect to signalcaptcha://\n" + + "Everything after signalcaptcha:// is the captcha token.\n" + + "Use the following command to submit the captcha token:\n" + + "signal-cli submitRateLimitChallenge --challenge CHALLENGE_TOKEN --captcha CAPTCHA_TOKEN" + : "" + ), identifier, failure.getOptions() .stream()