diff --git a/xmtp_mls/src/configuration.rs b/xmtp_mls/src/configuration.rs index ed49fa75e..58fd3a0b1 100644 --- a/xmtp_mls/src/configuration.rs +++ b/xmtp_mls/src/configuration.rs @@ -33,3 +33,5 @@ pub const MAX_GROUP_SIZE: u8 = 250; /// | 0x0005 | external_senders | GC | Y | RFC XXXX | /// | 0xff00 - 0xffff | Reserved for Private Use | N/A | N/A | RFC XXXX | pub const MUTABLE_METADATA_EXTENSION_ID: u16 = 0xff00; + +pub const DEFAULT_GROUP_NAME: &str = "New Group"; diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index 15b2d97e0..1efd016b1 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -59,7 +59,9 @@ use self::{ use crate::{ client::{deserialize_welcome, ClientError, MessageProcessingError}, - configuration::{CIPHERSUITE, MAX_GROUP_SIZE, MUTABLE_METADATA_EXTENSION_ID}, + configuration::{ + CIPHERSUITE, DEFAULT_GROUP_NAME, MAX_GROUP_SIZE, MUTABLE_METADATA_EXTENSION_ID, + }, hpke::{decrypt_welcome, HpkeError}, identity::{Identity, IdentityError}, retry::RetryableError, @@ -207,8 +209,7 @@ where &client.identity, permissions.unwrap_or_default().to_policy_set(), )?; - // TODO: Add constant for default group name - let mutable_metadata = build_mutable_metadata_extension("New Group".to_string())?; + let mutable_metadata = build_mutable_metadata_extension(DEFAULT_GROUP_NAME.to_string())?; let group_config = build_group_config(protected_metadata, mutable_metadata)?; let mut mls_group = OpenMlsGroup::new(