Skip to content

Commit

Permalink
add public is_welcome
Browse files Browse the repository at this point in the history
  • Loading branch information
germ-mark committed Feb 27, 2025
1 parent d3ed28e commit 4bd4eec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions mls-rs/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -688,8 +688,6 @@ where
Group::from_snapshot(self.config.clone(), legacy.into()).await
}
}


}

/// Load an existing group state into this client using the
Expand Down
7 changes: 7 additions & 0 deletions mls-rs/src/group/framing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<GroupInfo> {
match self.payload {
Expand Down

0 comments on commit 4bd4eec

Please sign in to comment.