diff --git a/.gitignore b/.gitignore index 148ee30..30fc374 100644 --- a/.gitignore +++ b/.gitignore @@ -140,8 +140,10 @@ config.json # matrix bot storage storage.json +cryptoStorage # compiled nim output *.js -tests/credentials.nim \ No newline at end of file +# ignore test account info +tests/credentials.nim diff --git a/examples/echo.nim b/examples/echo.nim index a3a6d41..b9e52a2 100644 --- a/examples/echo.nim +++ b/examples/echo.nim @@ -1,10 +1,13 @@ -import ../src/nimbotsdk/[matrixTypes, MatrixClient, AutojoinRoomsMixin] +import ../src/nimbotsdk/[matrixTypes, MatrixClient, AutojoinRoomsMixin, SimpleFsStorageProvider, RustSdkCryptoStorageProvider] const homeserver: cstring = "https://matrix.example.xyz" 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)