pub fn propose_add_member(
        &mut self,
        backend: &impl OpenMlsCryptoProvider,

        key_package: &KeyPackage,
    ) -> Result<MlsMessageOut, ManagedGroupError> {
        if !self.active {
            return Err(ManagedGroupError::UseAfterEviction(UseAfterEviction::Error));
        }

        let credential = self.credential()?;
        let credential_bundle: CredentialBundle = backend
            .key_store()
            .read(credential.signature_key())
            .ok_or(ManagedGroupError::NoMatchingCredentialBundle)?;

        let add_proposal = self.group.create_add_proposal(
            self.framing_parameters(),
            &credential_bundle,
            key_package.clone(),
            backend,
        )?;

        let mls_message = self.plaintext_to_mls_message(add_proposal, backend)?;

        // Since the state of the group was changed, call the auto-save function
        self.auto_save();

        Ok(mls_message)
    }
/// Creates proposals to add members to the group
Creates proposals to add members to the group
Creates proposals to add members to the group
pub fn propose_add_member(
        &mut self,
        backend: &impl OpenMlsCryptoProvider,
        key_package: &KeyPackage,
    ) -> Result<MlsMessageOut, ManagedGroupError> {
        if !self.active {
            return Err(ManagedGroupError::UseAfterEviction(UseAfterEviction::Error));
        }
        let credential = self.credential()?;
        let credential_bundle: CredentialBundle = backend
            .key_store()
            .read(credential.signature_key())
            .ok_or(ManagedGroupError::NoMatchingCredentialBundle)?;
        let add_proposal = self.group.create_add_proposal(
            self.framing_parameters(),
            &credential_bundle,
            key_package.clone(),
            backend,
        )?;
        let mls_message = self.plaintext_to_mls_message(add_proposal, backend)?;
        // Since the state of the group was changed, call the auto-save function
        self.auto_save();
        Ok(mls_message)
    }
pub fn propose_add_member ( & mut self , backend : & impl OpenMlsCryptoProvider , key_package : & KeyPackage , ) -> Result < MlsMessageOut , ManagedGroupError > { if ! self . active { return Err ( ManagedGroupError :: UseAfterEviction ( UseAfterEviction :: Error ) ) ; } let credential = self . credential ( ) ? ; let credential_bundle : CredentialBundle = backend . key_store ( ) . read ( credential . signature_key ( ) ) . ok_or ( ManagedGroupError :: NoMatchingCredentialBundle ) ? ; let add_proposal = self . group . create_add_proposal ( self . framing_parameters ( ) , & credential_bundle , key_package . clone ( ) , backend , ) ? ; let mls_message = self . plaintext_to_mls_message ( add_proposal , backend ) ? ; // Since the state of the group was changed, call the auto-save function self . auto_save ( ) ; Ok ( mls_message ) }
Creates proposals to add members to the group
Creates proposals to add members to the group
&mut self
backend
&impl OpenMlsCryptoProvider
key_package
&KeyPackage
&mut self
backend
&impl OpenMlsCryptoProvider
key_package
&KeyPackage