Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mchenani committed Jan 24, 2025
1 parent c3a3f91 commit 6f54733
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions xmtp_mls/src/groups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1213,23 +1213,6 @@ impl<ScopedClient: ScopedGroupClient> MlsGroup<ScopedClient> {
}
}

/// Check the group expiration settings, and if both are gt then 0 will return the settings
pub fn get_group_message_expiration_settings_if_valid(
&self,
provider: &XmtpOpenMlsProvider,
) -> Option<ConversationMessageDisappearingSettings> {
match self.conversation_message_disappearing_settings(provider) {
Ok(expiration_settings) => {
if expiration_settings.from_ns > 0 && expiration_settings.in_ns > 0 {
Some(expiration_settings)
} else {
None
}
}
Err(_) => None,
}
}

/// Retrieves the admin list of the group from the group's mutable metadata extension.
pub fn admin_list(&self, provider: &XmtpOpenMlsProvider) -> Result<Vec<String>, GroupError> {
let mutable_metadata = self.mutable_metadata(provider)?;
Expand Down Expand Up @@ -2708,7 +2691,7 @@ pub(crate) mod tests {
description: Some("group description".to_string()),
pinned_frame_url: Some("pinned frame".to_string()),
message_disappearing_settings: Some(
expected_group_message_disappearing_settings,
expected_group_message_disappearing_settings.clone(),
),
},
)
Expand Down Expand Up @@ -3048,7 +3031,7 @@ pub(crate) mod tests {

amal_group
.update_conversation_message_disappearing_settings(
expected_group_message_expiration_settings,
expected_group_message_expiration_settings.clone(),
)
.await
.unwrap();
Expand Down

0 comments on commit 6f54733

Please sign in to comment.