Skip to content

Commit 399addb

Browse files
committed
xmpp: track replies via OriginID
1 parent a04cfd3 commit 399addb

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

bridge/xmpp/xmpp.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,10 @@ func (b *Bxmpp) handleXMPP() error {
325325
if v.StanzaID.ID != "" {
326326
// Here the stanza-id has been set by the server and can be used to provide replies
327327
// as explained in XEP-0461 https://xmpp.org/extensions/xep-0461.html#business-id
328-
b.stanzaIDs.Add(v.StanzaID.ID, v.ID)
329-
b.replyHeaders.Add(v.ID, xmpp.Reply{ID: v.StanzaID.ID, To: v.Remote})
328+
b.stanzaIDs.Add(v.StanzaID.ID, v.OriginID)
329+
r := xmpp.Reply{ID: v.StanzaID.ID, To: v.Remote}
330+
b.replyHeaders.Add(v.OriginID, r)
331+
b.Log.Debugf("Caching StanzaID: %v -> %v -> %v", v.StanzaID.ID, v.OriginID, r)
330332
}
331333

332334
// Skip invalid messages.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,4 @@ require (
158158

159159
go 1.24.0
160160

161-
replace github.com/xmppo/go-xmpp => github.com/sh4sh/go-xmpp xmpp-reply
161+
replace github.com/xmppo/go-xmpp => github.com/sh4sh/go-xmpp v0.0.0-20260306045944-c36945baa3d9

0 commit comments

Comments
 (0)