fix: add channelID to SdsUnwrapResponse (#17)

This commit is contained in:
Akhil
2025-07-24 17:08:30 +05:30
committed by GitHub
parent 4e10d77218
commit 569607b616
@@ -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)))