Commit bf5d641856
Unsigned
Layout: unified · split
Cargo.toml +6 −2
| @@ -16,7 +16,11 @@ tokio = { version = "0.2.13", features = [ "rt-threaded" ] } | |||
| 16 | async-std = { version = "1.5.0", features = [ "unstable" ] } | 16 | async-std = { version = "1.5.0", features = [ "unstable" ] } |
| 17 | clap = "2.33.0" | 17 | clap = "2.33.0" |
| 18 | 18 | ||
| 19 | matrix-sdk = { git = "https://github.com/matrix-org/matrix-rust-sdk" } | ||
| 20 | |||
| 21 | weechat = { git = "https://github.com/poljar/rust-weechat", features = ["async-executor"] } | 19 | weechat = { git = "https://github.com/poljar/rust-weechat", features = ["async-executor"] } |
| 22 | weechat-sys = { git = "https://github.com/poljar/rust-weechat" } | 20 | weechat-sys = { git = "https://github.com/poljar/rust-weechat" } |
| 21 | |||
| 22 | [dependencies.matrix-sdk] | ||
| 23 | git = "https://github.com/matrix-org/matrix-rust-sdk/" | ||
| 24 | branch = "encryption" | ||
| 25 | default-features = false | ||
| 26 | features = ["encryption"] | ||
src/server.rs +2 −2
| @@ -475,7 +475,7 @@ impl MatrixServer { | |||
| 475 | mut client: AsyncClient, | 475 | mut client: AsyncClient, |
| 476 | channel: Sender<Result<ThreadMessage, String>>, | 476 | channel: Sender<Result<ThreadMessage, String>>, |
| 477 | ) { | 477 | ) { |
| 478 | if !client.logged_in() { | 478 | if !client.logged_in().await { |
| 479 | let ret = client.login("example", "wordpass", None).await; | 479 | let ret = client.login("example", "wordpass", None).await; |
| 480 | 480 | ||
| 481 | match ret { | 481 | match ret { |
| @@ -491,7 +491,7 @@ impl MatrixServer { | |||
| 491 | } | 491 | } |
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | let sync_token = client.sync_token(); | 494 | let sync_token = client.sync_token().await; |
| 495 | let sync_settings = SyncSettings::new() | 495 | let sync_settings = SyncSettings::new() |
| 496 | .timeout(DEFAULT_SYNC_TIMEOUT) | 496 | .timeout(DEFAULT_SYNC_TIMEOUT) |
| 497 | .expect("Invalid sync timeout"); | 497 | .expect("Invalid sync timeout"); |