Skip to content

Commit

Permalink
Fix decoding FB JIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 1, 2024
1 parent d73cde0 commit 463c5b3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion binary/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,16 @@ func (r *binaryDecoder) readFBJID() (interface{}, error) {
if err != nil {
return nil, err
}
server, err := r.read(true)
if err != nil {
return nil, err
} else if server == nil {
return nil, ErrInvalidJIDType
}
return types.JID{
User: user.(string),
Device: uint16(device),
Server: types.MessengerServer,
Server: server.(string),
}, nil
}

Expand Down

0 comments on commit 463c5b3

Please sign in to comment.