Commit 74742a31a8
Unsigned
Layout: unified · split
Cargo.toml +1
| @@ -16,6 +16,7 @@ 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 | async-trait = "0.1.29" | 18 | async-trait = "0.1.29" |
| 19 | uuid = { version = "0.8.1", features = ["v4"] } | ||
| 19 | 20 | ||
| 20 | weechat = { git = "https://github.com/poljar/rust-weechat", features = ["async-executor"] } | 21 | weechat = { git = "https://github.com/poljar/rust-weechat", features = ["async-executor"] } |
| 21 | weechat-sys = { git = "https://github.com/poljar/rust-weechat" } | 22 | weechat-sys = { git = "https://github.com/poljar/rust-weechat" } |
src/server.rs +4 −1
| @@ -58,6 +58,7 @@ use std::rc::{Rc, Weak}; | |||
| 58 | use std::time::Duration; | 58 | use std::time::Duration; |
| 59 | use tokio::runtime::Runtime; | 59 | use tokio::runtime::Runtime; |
| 60 | use url::Url; | 60 | use url::Url; |
| 61 | use uuid::Uuid; | ||
| 61 | 62 | ||
| 62 | use matrix_sdk::api::r0::session::login::Response as LoginResponse; | 63 | use matrix_sdk::api::r0::session::login::Response as LoginResponse; |
| 63 | 64 | ||
| @@ -646,7 +647,9 @@ impl MatrixServer { | |||
| 646 | // TODO awaiting here means we can only send one message | 647 | // TODO awaiting here means we can only send one message |
| 647 | // at a time, we need to spawn a task here and return a | 648 | // at a time, we need to spawn a task here and return a |
| 648 | // oneshot channel that the caller can await. | 649 | // oneshot channel that the caller can await. |
| 649 | let ret = client.room_send(&room_id, content).await; | 650 | // TODO the room should remember the UUID for the local echo |
| 651 | // implementation. | ||
| 652 | let ret = client.room_send(&room_id, content, Some(Uuid::new_v4())).await; | ||
| 650 | 653 | ||
| 651 | match ret { | 654 | match ret { |
| 652 | Ok(_r) => (), | 655 | Ok(_r) => (), |