Commit d99044c80d

d99044c80d3e75fc165cd081cf4d874e236f6b34

parent: bea2e3f5ba

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2020-03-31 12:53 UTC

server: Update to the latest rust-sdk changes.

Layout: unified · split

src/server.rs +10 −4
@@ -54,8 +54,8 @@ use async_std::sync::channel as async_channel;
5454use async_std::sync::{Receiver, Sender};
5555use std::cell::RefCell;
5656use std::collections::HashMap;
57use std::time::Duration;
5857use std::rc::{Rc, Weak};
58use std::time::Duration;
5959use tokio::runtime::Runtime;
6060use url::Url;
6161
@@ -527,7 +527,14 @@ impl MatrixServer {
527527 password: String,
528528 ) {
529529 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;
531538
532539 match ret {
533540 Ok(response) => {
@@ -543,8 +550,7 @@ impl MatrixServer {
543550 }
544551
545552 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);
548554
549555 let sync_settings = if let Some(t) = sync_token {
550556 sync_settings.token(t)