mirror of
https://github.com/logos-messaging/logos-chat.git
synced 2026-05-16 17:39:28 +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:
|
if dir.kind == pcDir:
|
||||||
switch("path", dir.path)
|
switch("path", dir.path)
|
||||||
switch("path", dir.path / "src")
|
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",
|
"regex",
|
||||||
"web3",
|
"web3",
|
||||||
"https://github.com/jazzz/nim-sds#exports",
|
"https://github.com/jazzz/nim-sds#exports",
|
||||||
|
"libchat",
|
||||||
"waku",
|
"waku",
|
||||||
"ffi"
|
"ffi"
|
||||||
|
|
||||||
|
|||||||
@ -49,8 +49,8 @@ type KeyEntry* = object
|
|||||||
timestamp: int64
|
timestamp: int64
|
||||||
|
|
||||||
type ChatClient* = ref object
|
type ChatClient* = ref object
|
||||||
ident: Identity
|
|
||||||
libchatCtx: LibChat
|
libchatCtx: LibChat
|
||||||
|
ident: Identity
|
||||||
ds*: WakuClient
|
ds*: WakuClient
|
||||||
keyStore: Table[string, KeyEntry] # Keyed by HexEncoded Public Key
|
keyStore: Table[string, KeyEntry] # Keyed by HexEncoded Public Key
|
||||||
conversations: Table[string, Conversation] # Keyed by conversation ID
|
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(ident: ident,
|
||||||
var c = ChatClient(
|
var c = ChatClient(
|
||||||
libchatCtx: newConversationsContext(),
|
libchatCtx: newConversationsContext(),
|
||||||
|
ident: ident,
|
||||||
ds: ds,
|
ds: ds,
|
||||||
keyStore: initTable[string, KeyEntry](),
|
keyStore: initTable[string, KeyEntry](),
|
||||||
conversations: initTable[string, Conversation](),
|
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