mirror of
https://github.com/logos-messaging/nim-sds.git
synced 2026-07-02 13:59:41 +00:00
Update sds/protobuf.nim
Co-authored-by: Esteban C Borsani <ecastroborsani@gmail.com>
This commit is contained in:
parent
b970e49570
commit
a39a1dea1e
@ -139,7 +139,10 @@ proc deserializeMessage*(data: seq[byte]): Result[SdsMessage, ReliabilityError]
|
||||
let msg = Protobuf.decode(data, SdsMessagePB).fromPB
|
||||
if msg.messageId.len == 0 or msg.channelId.len == 0:
|
||||
return err(ReliabilityError.reDeserializationError)
|
||||
for e in msg.causalHistory & msg.repairRequest:
|
||||
for e in msg.causalHistory:
|
||||
if e.messageId.len == 0:
|
||||
return err(ReliabilityError.reDeserializationError)
|
||||
for e in msg.repairRequest:
|
||||
if e.messageId.len == 0:
|
||||
return err(ReliabilityError.reDeserializationError)
|
||||
return ok(msg)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user