Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Nov 15, 2023
2 parents 62c243a + 2b3e0c3 commit 90e97e3
Show file tree
Hide file tree
Showing 2 changed files with 247 additions and 90 deletions.
18 changes: 1 addition & 17 deletions xmtp_mls/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ fn extract_welcome(welcome_bytes: &Vec<u8>) -> Result<Welcome, ClientError> {
mod tests {
use xmtp_cryptography::utils::generate_local_wallet;

use crate::{builder::ClientBuilder, storage::EncryptedMessageStore, InboxOwner};
use crate::{builder::ClientBuilder, InboxOwner};

#[tokio::test]
async fn test_mls_error() {
Expand Down Expand Up @@ -308,28 +308,12 @@ mod tests {
let bob = ClientBuilder::new_test_client(generate_local_wallet().into()).await;
bob.register_identity().await.unwrap();

let conn = &mut alice.store.conn().unwrap();
let alice_bob_group = alice.create_group().unwrap();
alice_bob_group
.add_members_by_installation_id(vec![bob.installation_public_key()])
.await
.unwrap();

// Manually mark as committed
// TODO: Replace with working synchronization once we can add members end to end
let intents = EncryptedMessageStore::find_group_intents(
conn,
alice_bob_group.group_id.clone(),
None,
None,
)
.unwrap();
let intent = intents.first().unwrap();
// Set the intent to committed manually
EncryptedMessageStore::set_group_intent_committed(conn, intent.id).unwrap();

alice_bob_group.post_commit(conn).await.unwrap();

let bob_received_groups = bob.sync_welcomes().await.unwrap();
assert_eq!(bob_received_groups.len(), 1);
assert_eq!(
Expand Down
Loading

0 comments on commit 90e97e3

Please sign in to comment.