diff --git a/mls-rs/src/client.rs b/mls-rs/src/client.rs index c5f9e19a..94f2713a 100644 --- a/mls-rs/src/client.rs +++ b/mls-rs/src/client.rs @@ -2,11 +2,11 @@ // Copyright by contributors to this project. // SPDX-License-Identifier: (Apache-2.0 OR MIT) -use crate::group::snapshot::legacy::LegacySnapshot; use crate::cipher_suite::CipherSuite; use crate::client_builder::{recreate_config, BaseConfig, ClientBuilder, MakeConfig}; use crate::client_config::ClientConfig; use crate::group::framing::MlsMessage; +use crate::group::snapshot::legacy::LegacySnapshot; use crate::group::{cipher_suite_provider, validate_group_info_joiner, GroupInfo}; use crate::group::{ @@ -688,8 +688,6 @@ where Group::from_snapshot(self.config.clone(), legacy.into()).await } } - - } /// Load an existing group state into this client using the diff --git a/mls-rs/src/group/framing.rs b/mls-rs/src/group/framing.rs index 3df6195c..23f3dc20 100644 --- a/mls-rs/src/group/framing.rs +++ b/mls-rs/src/group/framing.rs @@ -386,6 +386,13 @@ impl MlsMessage { } } + pub fn is_welcome(&self) -> bool { + match self.payload { + MlsMessagePayload::Welcome(_) => true, + _ => false, + } + } + #[inline(always)] pub fn into_group_info(self) -> Option { match self.payload {