From 2cd53d69b0a8426e4f7bb778a29de0d490249c5f Mon Sep 17 00:00:00 2001 From: Jazz Turner-Baggs <473256+jazzz@users.noreply.github.com> Date: Wed, 15 Oct 2025 16:20:54 -0700 Subject: [PATCH] Fix BotEcho --- examples/bot_echo.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/bot_echo.nim b/examples/bot_echo.nim index 4a85108..c3eb755 100644 --- a/examples/bot_echo.nim +++ b/examples/bot_echo.nim @@ -11,18 +11,18 @@ import ./tui/persistence # Temporary Workaround for PeerDiscovery proc main() {.async.} = let cfg = await getCfg("EchoBot") - # let dsConfig = DefaultConfig() - # let ident = createIdentity("EchoBot") + let dsConfig = DefaultConfig() + let ident = createIdentity("EchoBot") var chatClient = newClient(dsConfig, ident) - chatClient.onNewMessage(proc(convo: Conversation, msg: ContentFrame) {.async.} = + chatClient.onNewMessage(proc(convo: Conversation, msg: ReceivedMessage) {.async.} = info "New Message: ", convoId = convo.id(), msg= msg - await convo.sendMessage(chatClient.ds, msg) + discard await convo.sendMessage(chatClient.ds, msg.content) ) chatClient.onNewConversation(proc(convo: Conversation) {.async.} = info "New Conversation Initiated: ", convoId = convo.id() - await convo.sendMessage(chatClient.ds, initTextFrame("Hello!").toContentFrame()) + discard await convo.sendMessage(chatClient.ds, initTextFrame("Hello!").toContentFrame()) ) await chatClient.start()