]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/util/SendMessageResultUtils.java
Implement reacting to stories
[signal-cli] / src / main / java / org / asamk / signal / util / SendMessageResultUtils.java
index 74f49534f164747008564d95a1a3ebe4a1971bb4..cf2b282fabd33d8f150c0f43eb94ee66205e0e40 100644 (file)
@@ -84,11 +84,11 @@ public class SendMessageResultUtils {
                             + (
                             failure.getOptions().contains(ProofRequiredException.Option.RECAPTCHA)
                                     ? """
-                                    To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html
-                                    Check the developer tools (F12) console for a failed redirect to signalcaptcha://
-                                    Everything after signalcaptcha:// is the captcha token.
-                                    Use the following command to submit the captcha token:
-                                    signal-cli submitRateLimitChallenge --challenge CHALLENGE_TOKEN --captcha CAPTCHA_TOKEN"""
+                                      To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html
+                                      Check the developer tools (F12) console for a failed redirect to signalcaptcha://
+                                      Everything after signalcaptcha:// is the captcha token.
+                                      Use the following command to submit the captcha token:
+                                      signal-cli submitRateLimitChallenge --challenge CHALLENGE_TOKEN --captcha CAPTCHA_TOKEN"""
                                     : ""
                     ),
                     identifier,
@@ -100,6 +100,8 @@ public class SendMessageResultUtils {
                     failure.getRetryAfterSeconds());
         } else if (result.isNetworkFailure()) {
             return String.format("Network failure for \"%s\"", identifier);
+        } else if (result.isRateLimitFailure()) {
+            return String.format("Rate limit failure for \"%s\"", identifier);
         } else if (result.isUnregisteredFailure()) {
             return String.format("Unregistered user \"%s\"", identifier);
         } else if (result.isIdentityFailure()) {