Correlate own MUC reflections without origin-id (fix Matrix reactions) #5
Loading…
Reference in a new issue
No description provided.
Delete branch "outgoing-reactions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Reactions (and replies, edits, read receipts) sent from Matrix to a MUC referenced the bridge invented
mx-...id instead of the room-assigned id attribute that remote clients actually see. XMPP clients silently dropped the reactions: the stanza went out, Matrix reported success, nothing appeared on the XMPP side.The mapping to the room-assigned id was only learned from own reflected MUC messages carrying an origin-id; services that rewrite the id attribute and strip XEP-0359 elements from reflections left the bridge with no mapping at all.
Fix
HandleMatrixMessagerecords outgoing MUC messages in a pending outbox (per room + sender nick, capped, 15 min TTL).noteOwnMUCReflection: identity match, else oldest-first FIFO.rawIDForOutgoingReferencehands out the room-assigned form.type=error) are logged at warn with error type/condition/text.6cba0e6(Matrix reaction removal targeting + hardened outgoing MUC stanzas).Testing
go test ./...passes,gofmt/go vetclean.