Skip to content

Commit

Permalink
wait for identity
Browse files Browse the repository at this point in the history
  • Loading branch information
codabrink committed Dec 3, 2024
1 parent 2ce4093 commit 06b0fff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xmtp_mls/src/groups/device_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ where
let sync_stream = receiver.stream_sync_messages();

async move {
// Wait for the identity to be ready before doing anything
while !client.identity().is_ready() {
crate::sleep(Duration::from_millis(200)).await;
}

pin_mut!(sync_stream);
let inbox_id = client.inbox_id();
let installation_id = hex::encode(client.installation_public_key());
Expand Down

0 comments on commit 06b0fff

Please sign in to comment.