Skip to content

Commit

Permalink
Fix encoding fb and interop jids
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 1, 2024
1 parent 0aec555 commit 72865e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions binary/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,13 @@ func (w *binaryEncoder) writeJID(jid types.JID) {
w.pushByte(token.FBJID)
w.write(jid.User)
w.pushInt16(int(jid.Device))
w.write(jid.Server)
} else if jid.Server == types.InteropServer {
w.pushByte(token.InteropJID)
w.write(jid.User)
w.pushInt16(int(jid.Device))
w.pushInt16(int(jid.Integrator))
w.write(jid.Server)
} else {
w.pushByte(token.JIDPair)
if len(jid.User) == 0 {
Expand Down

0 comments on commit 72865e8

Please sign in to comment.