]> nmode's Git Repositories - signal-cli/commitdiff
Fallback to legacy send if group send fails due to invalid prekey
authorAsamK <asamk@gmx.de>
Tue, 23 May 2023 17:15:04 +0000 (19:15 +0200)
committerAsamK <asamk@gmx.de>
Tue, 23 May 2023 17:34:13 +0000 (19:34 +0200)
lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java

index 36c4f0d535052d00035cb27afe2dbe41d66eacf1..666867fe68834ad187e4c6a3c7dbb218d342bf3f 100644 (file)
@@ -617,6 +617,13 @@ public class SendHelper {
         } catch (NotFoundException e) {
             logger.warn("Someone was unregistered. Falling back to legacy sends.", e);
             return null;
+        } catch (IOException e) {
+            if (e.getCause() instanceof InvalidKeyException) {
+                logger.warn("Invalid key. Falling back to legacy sends.", e);
+                return null;
+            } else {
+                throw e;
+            }
         }
     }