Commit d99044c80d
Unsigned
Layout: unified · split
src/server.rs +10 −4
| @@ -54,8 +54,8 @@ use async_std::sync::channel as async_channel; | ||
| 54 | 54 | use async_std::sync::{Receiver, Sender}; |
| 55 | 55 | use std::cell::RefCell; |
| 56 | 56 | use std::collections::HashMap; |
| 57 | use std::time::Duration; | |
| 58 | 57 | use std::rc::{Rc, Weak}; |
| 58 | use std::time::Duration; | |
| 59 | 59 | use tokio::runtime::Runtime; |
| 60 | 60 | use url::Url; |
| 61 | 61 | |
| @@ -527,7 +527,14 @@ impl MatrixServer { | ||
| 527 | 527 | password: String, |
| 528 | 528 | ) { |
| 529 | 529 | if !client.logged_in().await { |
| 530 | let ret = client.login(username, password, None, Some("Weechat-Matrix".to_owned())).await; | |
| 530 | let ret = client | |
| 531 | .login( | |
| 532 | username, | |
| 533 | password, | |
| 534 | None, | |
| 535 | Some("Weechat-Matrix".to_owned()), | |
| 536 | ) | |
| 537 | .await; | |
| 531 | 538 | |
| 532 | 539 | match ret { |
| 533 | 540 | Ok(response) => { |
| @@ -543,8 +550,7 @@ impl MatrixServer { | ||
| 543 | 550 | } |
| 544 | 551 | |
| 545 | 552 | let sync_token = client.sync_token().await; |
| 546 | let sync_settings = SyncSettings::new() | |
| 547 | .timeout(DEFAULT_SYNC_TIMEOUT); | |
| 553 | let sync_settings = SyncSettings::new().timeout(DEFAULT_SYNC_TIMEOUT); | |
| 548 | 554 | |
| 549 | 555 | let sync_settings = if let Some(t) = sync_token { |
| 550 | 556 | sync_settings.token(t) |