mirror of
https://github.com/status-im/status-node-manager.git
synced 2025-02-21 08:48:12 +00:00
refactor(SNM): Handle noise
option of sendMessage
command
This commit is contained in:
parent
7f7149ce9c
commit
935e278675
@ -119,9 +119,15 @@ proc doWakuSendMessage(config: StatusNodeManagerConfig,
|
||||
else:
|
||||
defaultWakuContentTopic
|
||||
|
||||
let noise = if config.noise.isSome:
|
||||
config.noise.get
|
||||
else:
|
||||
false
|
||||
|
||||
let requestData = WakuSendMessageRequestData(
|
||||
message: config.message,
|
||||
contentTopic: contentTopic
|
||||
contentTopic: contentTopic,
|
||||
noise: noise
|
||||
)
|
||||
|
||||
waitFor wakuSendMessage(wakuClient, requestData)
|
||||
|
@ -101,7 +101,8 @@ proc installWakuApiHandlers*(router: var RestRouter,
|
||||
try:
|
||||
let wakuSendResult = wakuSendMessage(wakuHost,
|
||||
wakuSendMessageData.message,
|
||||
wakuSendMessageData.contentTopic)
|
||||
wakuSendMessageData.contentTopic,
|
||||
wakuSendMessageData.noise)
|
||||
|
||||
notice "Waku message sent successfully! Request fulfilled."
|
||||
return RestApiResponse.response("Message sent successfully",
|
||||
|
@ -11,3 +11,4 @@ type WakuExportHandshakeRequestData* = object
|
||||
type WakuSendMessageRequestData* = object
|
||||
message*: string
|
||||
contentTopic*: string
|
||||
noise*: bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user