fix(rest): fix bug in rest api when sending rln message (#2169)

This commit is contained in:
Alvaro Revuelta 2023-10-30 16:19:49 +01:00 committed by GitHub
parent f0f69b3235
commit 250e8b983c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ proc installRelayApiHandlers*(router: var RestRouter, node: WakuNode, cache: Mes
# if we reach here its either a non-RLN message or a RLN message with a valid proof
debug "Publishing message", pubSubTopic=pubSubTopic, rln=defined(rln)
if not (waitFor node.publish(some(pubSubTopic), resMessage.value).withTimeout(futTimeout)):
if not (waitFor node.publish(some(pubSubTopic), message).withTimeout(futTimeout)):
error "Failed to publish message to topic", pubSubTopic=pubSubTopic
return RestApiResponse.internalServerError("Failed to publish: timedout")
@ -309,4 +309,4 @@ proc installRelayApiHandlers*(router: var RestRouter, node: WakuNode, cache: Mes
error "Failed to publish message to topic", contentTopic=message.contentTopic
return RestApiResponse.internalServerError("Failed to publish: timedout")
return RestApiResponse.ok()
return RestApiResponse.ok()