mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-27 14:44:16 +00:00
Fix: preserve quote context when author is null or invalid
This commit is contained in:
parent
f9cbfa6d6c
commit
b7367257b7
@ -145,7 +145,6 @@ public record MessageEnvelope(
|
||||
dataMessage.getProfileKey().isPresent(),
|
||||
dataMessage.getReaction().map(r -> Reaction.from(r, recipientResolver, addressResolver)),
|
||||
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()
|
||||
@ -242,9 +241,11 @@ public record MessageEnvelope(
|
||||
final AttachmentFileProvider fileProvider
|
||||
) {
|
||||
return new Quote(quote.getId(),
|
||||
addressResolver.resolveRecipientAddress(recipientResolver.resolveRecipient(quote.getAuthor()))
|
||||
.toApiRecipientAddress(),
|
||||
Optional.of(quote.getText()),
|
||||
quote.getAuthor() != null && quote.getAuthor().isValid()
|
||||
? addressResolver.resolveRecipientAddress(recipientResolver.resolveRecipient(quote.getAuthor()))
|
||||
.toApiRecipientAddress()
|
||||
: new RecipientAddress(RecipientAddress.UNKNOWN_UUID),
|
||||
Optional.ofNullable(quote.getText()),
|
||||
quote.getMentions() == null
|
||||
? List.of()
|
||||
: quote.getMentions()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user