From 227f87e1ceac926ef62700cf6579c842a3b05470 Mon Sep 17 00:00:00 2001 From: AsamK Date: Tue, 23 May 2023 19:15:04 +0200 Subject: [PATCH] Fallback to legacy send if group send fails due to invalid prekey --- .../java/org/asamk/signal/manager/helper/SendHelper.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java b/lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java index 36c4f0d5..666867fe 100644 --- a/lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java +++ b/lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java @@ -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; + } } }