Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FS-901] Update the key package reference mapping of the creator of the subconversation #2975

Merged
merged 3 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5-internal/subconv-update-path
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Via the update path update the key package of the committer in epoch 0 of a subconversation
2 changes: 2 additions & 0 deletions services/galley/src/Galley/API/MLS/Message.hs
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,8 @@ processInternalCommit qusr senderClient con lConvOrSub epoch action senderRef co
unless (isClientMember (mkClientIdentity qusr creatorClient) (mcMembers parentConv)) $
throwS @'MLSSubConvClientNotInParent
let creatorRef = fromMaybe senderRef updatePathRef
addKeyPackageRef creatorRef qusr creatorClient $
tUntagged (convOfConvOrSub . idForConvOrSub <$> lConvOrSub)
addMLSClients
(cnvmlsGroupId mlsMeta)
qusr
Expand Down
6 changes: 6 additions & 0 deletions services/galley/test/integration/API/MLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2362,9 +2362,15 @@ testJoinSubConv = do

resetGroup bob1 (pscGroupId sub)

bobRefsBefore <- getClientsFromGroupState bob1 bob
-- bob adds his first client to the subconversation
void $
createPendingProposalCommit bob1 >>= sendAndConsumeCommitBundle
bobRefsAfter <- getClientsFromGroupState bob1 bob
liftIO $
assertBool
"Bob's key package has not been updated via the update path"
(bobRefsBefore /= bobRefsAfter)

-- now alice joins with her own client
void $
Expand Down