Skip to content

Commit

Permalink
fixup! crypto: Provide a way to subscribe to identity status changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andybalaam committed Sep 30, 2024
1 parent 74a5e4d commit 3db3586
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/matrix-sdk/src/room/identity_status_changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ mod tests {
}

mod test_setup {
use std::time::Duration;
use std::time::{Duration, SystemTime, UNIX_EPOCH};

use futures_core::Stream;
use matrix_sdk_base::{
Expand All @@ -376,7 +376,6 @@ mod tests {
test_json::{self, keys_query_sets::IdentityChangeDataSet},
JoinedRoomBuilder, StateTestEvent, SyncResponseBuilder, DEFAULT_TEST_ROOM_ID,
};
use rand::{thread_rng, Rng as _};
use ruma::{
api::client::keys::get_keys, events::room::member::MembershipState, owned_user_id,
OwnedUserId, TransactionId, UserId,
Expand Down Expand Up @@ -636,7 +635,10 @@ mod tests {
"content": {
"membership": membership.to_string(),
},
"event_id": format!("$aa{}bb:localhost", thread_rng().gen_range(0..100000)),
"event_id": format!(
"$aa{}bb:localhost",
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis() % 100_000
),
"origin_server_ts": 1472735824,
"sender": "@example:localhost",
"state_key": user_id,
Expand Down

0 comments on commit 3db3586

Please sign in to comment.