Skip to content

Fix: preserve quote context when author is null or invalid#1941

Closed
joeykrug wants to merge 1 commit intoAsamK:masterfrom
joeykrug:fix/quote-null-author
Closed

Fix: preserve quote context when author is null or invalid#1941
joeykrug wants to merge 1 commit intoAsamK:masterfrom
joeykrug:fix/quote-null-author

Conversation

@joeykrug
Copy link

@joeykrug joeykrug commented Feb 27, 2026

Fixes #1935

Problem

When receiving a quoted/replied message, signal-cli silently drops the quote data if the quote author's ServiceId is null or fails the isValid() check. This means consumers of the signal-cli API (JSON-RPC, D-Bus) never receive quote context for these messages.

The root cause is an overly strict .filter() on the quote Optional in MessageEnvelope.java that discards the entire quote when the author can't be resolved, rather than preserving the quote with a fallback author.

Fix

  1. Remove the .filter(q -> q.getAuthor() != null && q.getAuthor().isValid()) that drops quotes entirely
  2. In Quote.from(), handle null/invalid authors by falling back to RecipientAddress.UNKNOWN_UUID
  3. Use Optional.ofNullable() for quote text (defensive)

Testing

This fix has been tested in production with a source-built 0.14.0-SNAPSHOT:

  • Message delivery works normally (two checkmarks)
  • Quote/reply context now flows through to JSON-RPC consumers
  • No regressions in message sending or receiving

@joeykrug
Copy link
Author

Closing due to other PR being a cleaner way to do this and more comprehensive

@joeykrug joeykrug closed this Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reaction field missing from SSE output in daemon --http mode

1 participant