fix: don't call encode inside EncodeMsgpack, ensure its delegated to the custom marshalers

This commit is contained in:
Derrick Hammer 2024-01-04 13:49:07 -05:00
parent c5c4bbfb6e
commit 261c88b568
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -31,11 +31,11 @@ func (fv *FileVersion) EncodeMsgpack(enc *msgpack.Encoder) error {
}
if fv.EncryptedCID != nil {
data[1] = fv.EncryptedCID.ToBytes()
data[1] = fv.EncryptedCID
}
if fv.PlaintextCID != nil {
data[2] = fv.PlaintextCID.ToBytes()
data[2] = fv.PlaintextCID
}
if len(fv.Hashes) > 0 {
@ -47,7 +47,7 @@ func (fv *FileVersion) EncodeMsgpack(enc *msgpack.Encoder) error {
}
if fv.Thumbnail != nil {
data[10] = fv.Thumbnail.Encode()
data[10] = fv.Thumbnail
}
return enc.Encode(data)