diff --git a/Cargo.toml b/Cargo.toml index feec43da..0e0f2089 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,27 +20,28 @@ futures = "0.3.4" reqwest = "0.10.4" http = "0.2.1" url = "2.1.1" -async-trait = "0.1.26" +async-trait = "0.1.30" # Ruma dependencies -js_int = "0.1.3" -ruma-api = "0.15.0-dev.1" -ruma-client-api = { git = "https://github.com/matrix-org/ruma-client-api/", version = "0.7.0" } -ruma-events = { git = "https://github.com/matrix-org/ruma-events", version = "0.18.0" } +js_int = "0.1.4" +ruma-api = "0.15.0" +ruma-client-api = { path = "/home/poljar/werk/misc/ruma-client-api", version = "0.7.0" } +ruma-events = { path = "/home/poljar/werk/misc/ruma-events", version = "0.18.0" } ruma-identifiers = "0.14.1" +uuid = { version = "0.8.1", features = ["v4"] } # Dependencies for the encryption support olm-rs = { git = "https://gitlab.gnome.org/poljar/olm-rs", optional = true, features = ["serde"]} -serde = { version = "1.0.105", optional = true, features = ["derive"] } -serde_json = { version = "1.0.49", optional = true } +serde = { version = "1.0.106", optional = true, features = ["derive"] } +serde_json = { version = "1.0.51", optional = true } cjson = { version = "0.1.0", optional = true } zeroize = { version = "1.1.0", optional = true } # Misc dependencies -thiserror = "1.0.13" +thiserror = "1.0.14" tracing = "0.1.13" atomic = "0.4.5" -dashmap = "3.9.1" +dashmap = "3.10.0" [dependencies.tracing-futures] version = "0.2.3" @@ -48,19 +49,19 @@ default-features = false features = ["std", "std-future"] [dependencies.tokio] -version = "0.2.13" +version = "0.2.16" default-features = false features = ["sync", "time"] [dependencies.sqlx] -version = "0.3.2" +version = "0.3.3" optional = true default-features = false features = ["runtime-tokio", "sqlite"] [dev-dependencies] -tokio = { version = "0.2.13", features = ["rt-threaded", "macros"] } -serde_json = { version = "1.0.49" } -tracing-subscriber = "0.2.3" +tokio = { version = "0.2.16", features = ["rt-threaded", "macros"] } +serde_json = "1.0.51" +tracing-subscriber = "0.2.4" tempfile = "3.1.0" -mockito = "0.23.3" +mockito = "0.25.1" diff --git a/src/async_client.rs b/src/async_client.rs index 308054cd..257f3d2b 100644 --- a/src/async_client.rs +++ b/src/async_client.rs @@ -20,6 +20,8 @@ use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; use std::time::{Duration, Instant}; +use uuid::Uuid; + use futures::future::Future; use tokio::sync::RwLock; use tokio::time::delay_for as sleep; @@ -668,7 +670,7 @@ impl AsyncClient { let request = create_message_event::Request { room_id: room_id.clone(), event_type: EventType::RoomMessage, - txn_id: self.transaction_id().to_string(), + txn_id: Uuid::new_v4().to_string(), data, };