mirror of
https://github.com/logos-messaging/nim-sds.git
synced 2026-01-02 14:13:07 +00:00
fix: add channelID to SdsUnwrapResponse
This commit is contained in:
parent
4e10d77218
commit
f0c7035e38
@ -18,6 +18,7 @@ type SdsMessageRequest* = object
|
||||
type SdsUnwrapResponse* = object
|
||||
message*: seq[byte]
|
||||
missingDeps*: seq[SdsMessageID]
|
||||
channelId*: string
|
||||
|
||||
proc createShared*(
|
||||
T: type SdsMessageRequest,
|
||||
@ -61,11 +62,11 @@ proc process*(
|
||||
of UNWRAP_MESSAGE:
|
||||
let messageBytes = self.message.toSeq()
|
||||
|
||||
let (unwrappedMessage, missingDeps, _) = unwrapReceivedMessage(rm[], messageBytes).valueOr:
|
||||
let (unwrappedMessage, missingDeps, channelId) = unwrapReceivedMessage(rm[], messageBytes).valueOr:
|
||||
error "UNWRAP_MESSAGE failed", error = error
|
||||
return err("error processing UNWRAP_MESSAGE request: " & $error)
|
||||
|
||||
let res = SdsUnwrapResponse(message: unwrappedMessage, missingDeps: missingDeps)
|
||||
let res = SdsUnwrapResponse(message: unwrappedMessage, missingDeps: missingDeps, channelId: channelId)
|
||||
|
||||
# return the result as a json string
|
||||
return ok($(%*(res)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user