mirror of
https://github.com/logos-messaging/nim-chat-poc.git
synced 2026-02-16 12:03:08 +00:00
Add libchat
This commit is contained in:
parent
062a436a84
commit
ab6516e72e
@ -5,3 +5,6 @@ for dir in walkDir(thisDir() / "vendor"):
|
||||
if dir.kind == pcDir:
|
||||
switch("path", dir.path)
|
||||
switch("path", dir.path / "src")
|
||||
|
||||
switch("path", thisDir() / "vendor/libchat/nim-bindings")
|
||||
switch("path", thisDir() / "vendor/libchat/nim-bindings/src")
|
||||
@ -21,6 +21,7 @@ requires "nim >= 2.2.4",
|
||||
"regex",
|
||||
"web3",
|
||||
"https://github.com/jazzz/nim-sds#exports",
|
||||
"libchat",
|
||||
"waku",
|
||||
"ffi"
|
||||
|
||||
|
||||
@ -49,8 +49,8 @@ type KeyEntry* = object
|
||||
timestamp: int64
|
||||
|
||||
type ChatClient* = ref object
|
||||
ident: Identity
|
||||
libchatCtx: LibChat
|
||||
ident: Identity
|
||||
ds*: WakuClient
|
||||
keyStore: Table[string, KeyEntry] # Keyed by HexEncoded Public Key
|
||||
conversations: Table[string, Conversation] # Keyed by conversation ID
|
||||
@ -79,6 +79,7 @@ proc newClient*(ds: WakuClient, ident: Identity): ChatClient {.raises: [IOError,
|
||||
var c = ChatClient(ident: ident,
|
||||
var c = ChatClient(
|
||||
libchatCtx: newConversationsContext(),
|
||||
ident: ident,
|
||||
ds: ds,
|
||||
keyStore: initTable[string, KeyEntry](),
|
||||
conversations: initTable[string, Conversation](),
|
||||
|
||||
2
vendor/libchat
vendored
2
vendor/libchat
vendored
@ -1 +1 @@
|
||||
Subproject commit 1e6a3edd798cdaa353012a2165f25891c80f4cf4
|
||||
Subproject commit a1008ec9694f86ff4f9e37f4c5b1a3dc510dc51f
|
||||
Loading…
x
Reference in New Issue
Block a user