Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
codabrink committed Feb 28, 2025
1 parent b802bf1 commit cb0d286
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions bindings_ffi/gen_kotlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cargo run --bin ffi-uniffi-bindgen \
--manifest-path $BINDINGS_MANIFEST \
--features uniffi/cli --release -- \
generate \
--lib-file $TARGET_DIR/release/lib$PROJECT_NAME.dylib $BINDINGS_PATH/src/$PROJECT_NAME.udl \
--lib-file $TARGET_DIR/release/lib$PROJECT_NAME.dylib \
--language kotlin

cd $BINDINGS_PATH
Expand Down Expand Up @@ -71,4 +71,3 @@ unzip -o LibXMTPKotlinFFI.zip
cd ../../..

cp -r $BINDINGS_PATH/src/uniffi/$PROJECT_NAME/jniLibs/* ~/XMTP/xmtp-android/library/src/main/jniLibs

8 changes: 4 additions & 4 deletions xmtp_mls/src/groups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -950,10 +950,10 @@ impl<ScopedClient: ScopedGroupClient> MlsGroup<ScopedClient> {
#[tracing::instrument(level = "trace", skip_all)]
pub async fn add_members(
&self,
account_addresses: &[PublicIdentifier],
account_identifiers: &[PublicIdentifier],
) -> Result<UpdateGroupMembershipResult, GroupError> {
// Fetch the associated inbox_ids
let requests = account_addresses.iter().map(Into::into).collect();
let requests = account_identifiers.iter().map(Into::into).collect();
let inbox_id_map: HashMap<PublicIdentifier, String> = self
.client
.api()
Expand All @@ -970,9 +970,9 @@ impl<ScopedClient: ScopedGroupClient> MlsGroup<ScopedClient> {
return Err(GroupError::UserLimitExceeded);
}

if inbox_id_map.len() != account_addresses.len() {
if inbox_id_map.len() != account_identifiers.len() {
let found_addresses: HashSet<&PublicIdentifier> = inbox_id_map.keys().collect();
let to_add_hashset = HashSet::from_iter(account_addresses.iter());
let to_add_hashset = HashSet::from_iter(account_identifiers.iter());

let missing_addresses = found_addresses.difference(&to_add_hashset);
return Err(GroupError::AddressNotFound(
Expand Down

0 comments on commit cb0d286

Please sign in to comment.