diff --git a/libs/wire-api/src/Wire/API/MLS/CommitBundle.hs b/libs/wire-api/src/Wire/API/MLS/CommitBundle.hs index f8281968196..1ca590e04ee 100644 --- a/libs/wire-api/src/Wire/API/MLS/CommitBundle.hs +++ b/libs/wire-api/src/Wire/API/MLS/CommitBundle.hs @@ -27,7 +27,7 @@ import Wire.API.MLS.Serialisation import Wire.API.MLS.Welcome data CommitBundle = CommitBundle - { commitMsg :: RawMLS Message, -- TODO: change this type to Commit + { commitMsg :: RawMLS Message, welcome :: Maybe (RawMLS Welcome), groupInfo :: RawMLS GroupInfo } diff --git a/services/galley/src/Galley/API/MLS/Message.hs b/services/galley/src/Galley/API/MLS/Message.hs index d1c94f17ce4..99f117cd48a 100644 --- a/services/galley/src/Galley/API/MLS/Message.hs +++ b/services/galley/src/Galley/API/MLS/Message.hs @@ -72,10 +72,10 @@ import Wire.API.MLS.Serialisation import Wire.API.MLS.SubConversation -- TODO: --- [ ] replace commit message in CommitBundle with a Commit object -- [ ] restore deleted MLS unit tests -- [ ] pass groupId and epoch to processProposal instead of the whole IncomingMessage -- [ ] remove LWT in planMLSClientRemoval +-- [ ] restore unsupported proposal integration test -- FUTUREWORK -- - Check that the capabilities of a leaf node in an add proposal contains all @@ -354,7 +354,7 @@ postMLSMessageToLocalConv qusr c con msg convOrSubId = do FramedContentCommit _commit -> throwS @'MLSUnsupportedMessage FramedContentApplicationData _ -> throwS @'MLSUnsupportedMessage FramedContentProposal prop -> - processProposal qusr lConvOrSub msg pub prop $> mempty + processProposal qusr lConvOrSub msg.groupId msg.epoch pub prop $> mempty IncomingMessageContentPrivate -> pure mempty let cm = membersConvOrSub (tUnqualified lConvOrSub) diff --git a/services/galley/src/Galley/API/MLS/Proposal.hs b/services/galley/src/Galley/API/MLS/Proposal.hs index 617d95c8fad..a838d96ea89 100644 --- a/services/galley/src/Galley/API/MLS/Proposal.hs +++ b/services/galley/src/Galley/API/MLS/Proposal.hs @@ -245,16 +245,17 @@ processProposal :: ) => Qualified UserId -> Local ConvOrSubConv -> - IncomingMessage -> -- TODO: just pass header? + GroupId -> + Epoch -> IncomingPublicMessageContent -> RawMLS Proposal -> Sem r () -processProposal qusr lConvOrSub msg pub prop = do +processProposal qusr lConvOrSub groupId epoch pub prop = do let mlsMeta = mlsMetaConvOrSub (tUnqualified lConvOrSub) -- Check if the epoch number matches that of a conversation - unless (msg.epoch == cnvmlsEpoch mlsMeta) $ throwS @'MLSStaleMessage + unless (epoch == cnvmlsEpoch mlsMeta) $ throwS @'MLSStaleMessage -- Check if the group ID matches that of a conversation - unless (msg.groupId == cnvmlsGroupId mlsMeta) $ throwS @'ConvNotFound + unless (groupId == cnvmlsGroupId mlsMeta) $ throwS @'ConvNotFound let suiteTag = cnvmlsCipherSuite mlsMeta -- FUTUREWORK: validate the member's conversation role @@ -262,7 +263,7 @@ processProposal qusr lConvOrSub msg pub prop = do checkProposal mlsMeta im prop.value when (isExternal pub.sender) $ checkExternalProposalUser qusr prop.value let propRef = authContentRef suiteTag (incomingMessageAuthenticatedContent pub) - storeProposal msg.groupId msg.epoch propRef ProposalOriginClient prop + storeProposal groupId epoch propRef ProposalOriginClient prop getKeyPackageIdentity :: Member (ErrorS 'MLSUnsupportedProposal) r =>