File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,18 @@ import ./tui/persistence # Temporary Workaround for PeerDiscovery
1111proc main () {.async .} =
1212
1313 let cfg = await getCfg (" EchoBot" )
14- # let dsConfig = DefaultConfig()
15- # let ident = createIdentity("EchoBot")
14+ let dsConfig = DefaultConfig ()
15+ let ident = createIdentity (" EchoBot" )
1616 var chatClient = newClient (dsConfig, ident)
1717
18- chatClient.onNewMessage (proc (convo: Conversation , msg: ContentFrame ) {.async .} =
18+ chatClient.onNewMessage (proc (convo: Conversation , msg: ReceivedMessage ) {.async .} =
1919 info " New Message: " , convoId = convo.id (), msg= msg
20- await convo.sendMessage (chatClient.ds, msg)
20+ discard await convo.sendMessage (chatClient.ds, msg.content )
2121 )
2222
2323 chatClient.onNewConversation (proc (convo: Conversation ) {.async .} =
2424 info " New Conversation Initiated: " , convoId = convo.id ()
25- await convo.sendMessage (chatClient.ds, initTextFrame (" Hello!" ).toContentFrame ())
25+ discard await convo.sendMessage (chatClient.ds, initTextFrame (" Hello!" ).toContentFrame ())
2626 )
2727
2828 await chatClient.start ()
You can’t perform that action at this time.
0 commit comments