mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-02-09 16:33:10 +00:00
* remove unneeded code * Update comment style * Update Nim side to support safer_ffi * Fix Introduction from impl * Updates
23 lines
523 B
Nim
23 lines
523 B
Nim
import results
|
|
|
|
import ../src/libchat
|
|
|
|
proc pingpong() =
|
|
|
|
var raya = newConversationsContext()
|
|
var saro = newConversationsContext()
|
|
|
|
|
|
# Perform out of band Introduction
|
|
let intro = raya.createIntroductionBundle().expect("[Raya] Couldn't create intro bundle")
|
|
echo "Raya's Intro Bundle: ",intro
|
|
|
|
var (convo_sr, payload) = saro.createNewPrivateConvo(intro,"Hey Raya").expect("[Saro] Couldn't create convo")
|
|
echo "ConvoHandle:: ", convo_sr
|
|
echo "Payload:: ", payload
|
|
|
|
|
|
|
|
when isMainModule:
|
|
pingpong()
|