]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java
Fallback to legacy send if group send fails due to invalid prekey
[signal-cli] / 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;
+            }
         }
     }