Skip to content

Commit

Permalink
write to storage on update
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed May 16, 2024
1 parent dcaef4c commit c359be1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openmls/src/group/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ pub enum CreateGroupContextExtProposalError<StorageError> {
/// See [`CreateCommitError`] for more details.
#[error(transparent)]
CreateCommitError(#[from] CreateCommitError<StorageError>),
#[error("Error writing updated group data to storage.")]
StorageError(StorageError),
}

/// Error merging a commit.
Expand Down
5 changes: 5 additions & 0 deletions openmls/src/group/mls_group/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,11 @@ impl MlsGroup {
create_commit_result.staged_commit,
)));

provider
.storage()
.write_group_state(self.group_id(), &self.group_state)
.map_err(CreateGroupContextExtProposalError::StorageError)?;

Ok((
mls_messages,
create_commit_result
Expand Down

0 comments on commit c359be1

Please sign in to comment.