Skip to content

Commit

Permalink
keep metadata update function as group name specific, avoid future br…
Browse files Browse the repository at this point in the history
…eaking changes
  • Loading branch information
cameronvoell committed Apr 15, 2024
1 parent 93b194a commit b938d06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bindings_ffi/src/mls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ impl FfiGroup {
self.created_at_ns,
);

group.update_group_metadata(group_name).await?;
group.update_group_name(group_name).await?;

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions xmtp_mls/src/groups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ where
self.sync_until_intent_resolved(conn, intent.id).await
}

pub async fn update_group_metadata(&self, group_name: String) -> Result<(), GroupError> {
pub async fn update_group_name(&self, group_name: String) -> Result<(), GroupError> {
let conn = &mut self.client.store.conn()?;
let intent_data: Vec<u8> = UpdateMetadataIntentData::new(group_name).into();
let intent = conn.insert_group_intent(NewGroupIntent::new(
Expand Down Expand Up @@ -1080,7 +1080,7 @@ mod tests {

// Update group name
amal_group
.update_group_metadata("New Group Name 1".to_string())
.update_group_name("New Group Name 1".to_string())
.await
.unwrap();

Expand Down

0 comments on commit b938d06

Please sign in to comment.