From e734c125ad21677abf0570390dd9b6f568f5fc83 Mon Sep 17 00:00:00 2001 From: AsamK Date: Wed, 8 Nov 2023 12:40:34 +0100 Subject: [PATCH] Ignore quotes without author Fixes #1369 --- .../java/org/asamk/signal/manager/api/MessageEnvelope.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/api/MessageEnvelope.java b/lib/src/main/java/org/asamk/signal/manager/api/MessageEnvelope.java index f4b63324..27c17650 100644 --- a/lib/src/main/java/org/asamk/signal/manager/api/MessageEnvelope.java +++ b/lib/src/main/java/org/asamk/signal/manager/api/MessageEnvelope.java @@ -140,7 +140,9 @@ public record MessageEnvelope( dataMessage.isProfileKeyUpdate(), dataMessage.getProfileKey().isPresent(), dataMessage.getReaction().map(r -> Reaction.from(r, recipientResolver, addressResolver)), - dataMessage.getQuote().map(q -> Quote.from(q, recipientResolver, addressResolver, fileProvider)), + dataMessage.getQuote() + .filter(q -> q.getAuthor() != null && q.getAuthor().isValid()) + .map(q -> Quote.from(q, recipientResolver, addressResolver, fileProvider)), dataMessage.getPayment().map(p -> p.getPaymentNotification().isPresent() ? Payment.from(p) : null), dataMessage.getAttachments() .map(a -> a.stream().map(as -> Attachment.from(as, fileProvider)).toList())