-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit bundles for subconversations (#2932)
* Add subconversation group info endpoint (wip, untested) * Fill implemention holes * refactor clientmap and add TODO for check * Throw when a client is not in the parent conv * Remove duplication in MLSConversation type * Refactor: Introduce incrementEpoch * Refactor: unqualify parent in SubConversation type * Bump mls-test-cli * Store group info bundle for subconvs * Fix epoch increment query for subconvs * Add join subconversation test * Turn TODO into FUTUREWORK * Add stubs of more subconversation tests * Add CHANGELOG entries * Deduplicate function to fetch remote group info Co-authored-by: Stefan Matting <stefan@wire.com> Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com>
- Loading branch information
1 parent
40eb018
commit aaa6452
Showing
23 changed files
with
408 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add `GET /conversations/:domain/:cid/subconversations/:id/groupinfo` endpoint to fetch the group info object for a subconversation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add support for subconversations in `POST /mls/commit-bundles` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
-- This file is part of the Wire Server implementation. | ||
-- | ||
-- Copyright (C) 2022 Wire Swiss GmbH <opensource@wire.com> | ||
-- | ||
-- This program is free software: you can redistribute it and/or modify it under | ||
-- the terms of the GNU Affero General Public License as published by the Free | ||
-- Software Foundation, either version 3 of the License, or (at your option) any | ||
-- later version. | ||
-- | ||
-- This program is distributed in the hope that it will be useful, but WITHOUT | ||
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
-- details. | ||
-- | ||
-- You should have received a copy of the GNU Affero General Public License along | ||
-- with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
module Galley.API.MLS.Conversation | ||
( mkMLSConversation, | ||
mcConv, | ||
) | ||
where | ||
|
||
import Galley.API.MLS.Types | ||
import Galley.Data.Conversation.Types as Data | ||
import Galley.Effects.MemberStore | ||
import Imports | ||
import Polysemy | ||
import Wire.API.Conversation.Protocol | ||
|
||
mkMLSConversation :: | ||
Member MemberStore r => | ||
Data.Conversation -> | ||
Sem r (Maybe MLSConversation) | ||
mkMLSConversation conv = | ||
for (Data.mlsMetadata conv) $ \mlsData -> do | ||
cm <- lookupMLSClients (cnvmlsGroupId mlsData) | ||
pure | ||
MLSConversation | ||
{ mcId = Data.convId conv, | ||
mcMetadata = Data.convMetadata conv, | ||
mcLocalMembers = Data.convLocalMembers conv, | ||
mcRemoteMembers = Data.convRemoteMembers conv, | ||
mcMLSData = mlsData, | ||
mcMembers = cm | ||
} | ||
|
||
mcConv :: MLSConversation -> Data.Conversation | ||
mcConv mlsConv = | ||
Data.Conversation | ||
{ convId = mcId mlsConv, | ||
convLocalMembers = mcLocalMembers mlsConv, | ||
convRemoteMembers = mcRemoteMembers mlsConv, | ||
convDeleted = False, | ||
convMetadata = mcMetadata mlsConv, | ||
convProtocol = ProtocolMLS (mcMLSData mlsConv) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.