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