diff --git a/binary/decoder.go b/binary/decoder.go index 0a95f9c0..3769134d 100644 --- a/binary/decoder.go +++ b/binary/decoder.go @@ -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 }