generated from array-in-a-matrix/matrix-bot-template
example using crypto
This commit is contained in:
parent
6dbd2e5546
commit
7dd8b317ae
2 changed files with 8 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -140,8 +140,10 @@ config.json
|
||||||
|
|
||||||
# matrix bot storage
|
# matrix bot storage
|
||||||
storage.json
|
storage.json
|
||||||
|
cryptoStorage
|
||||||
|
|
||||||
# compiled nim output
|
# compiled nim output
|
||||||
*.js
|
*.js
|
||||||
|
|
||||||
|
# ignore test account info
|
||||||
tests/credentials.nim
|
tests/credentials.nim
|
|
@ -1,10 +1,13 @@
|
||||||
import ../src/nimbotsdk/[matrixTypes, MatrixClient, AutojoinRoomsMixin]
|
import ../src/nimbotsdk/[matrixTypes, MatrixClient, AutojoinRoomsMixin, SimpleFsStorageProvider, RustSdkCryptoStorageProvider]
|
||||||
|
|
||||||
const
|
const
|
||||||
homeserver: cstring = "https://matrix.example.xyz"
|
homeserver: cstring = "https://matrix.example.xyz"
|
||||||
token: cstring = "token"
|
token: cstring = "token"
|
||||||
|
|
||||||
let client = newMatrixClient(homeserver, token)
|
let storage = newSimpleFsStorageProvider("storeage.json")
|
||||||
|
let cryptoStorage = newRustSdkCryptoStorageProvider("./cryptoStorage/")
|
||||||
|
|
||||||
|
let client = newMatrixClient(homeserver, token, storage, cryptoStorage)
|
||||||
|
|
||||||
AutojoinRoomsMixinSetupOnClient(client)
|
AutojoinRoomsMixinSetupOnClient(client)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue