From 7581176bc0aad3015505c54a93ec4e8a2ab0cd37 Mon Sep 17 00:00:00 2001 From: Mojtaba Chenani Date: Wed, 27 Nov 2024 21:07:33 +0100 Subject: [PATCH] fix(forked-groups): make add members thread safe --- xmtp_mls/src/groups/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index 2b71c2e76..f79e887fc 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -754,6 +754,8 @@ impl MlsGroup { &self, inbox_ids: &[S], ) -> Result<(), GroupError> { + let _permit = MLS_COMMIT_LOCK.acquire().await.unwrap(); + let provider = self.client.mls_provider()?; let ids = inbox_ids.iter().map(AsRef::as_ref).collect::>(); let intent_data = self