Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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/2-features/mls-external-commits
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Introduce support for external commits in MLS
9 changes: 9 additions & 0 deletions libs/wire-api/src/Wire/API/Error/Galley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ data GalleyError
| MLSClientSenderUserMismatch
| MLSWelcomeMismatch
| MLSMissingGroupInfo
| MLSMissingExternalInit
| MLSRemovalUserMismatch
| MLSExternalCommitRemoveProposal
| --
NoBindingTeamMembers
| NoBindingTeam
Expand Down Expand Up @@ -206,6 +209,12 @@ type instance MapError 'MLSWelcomeMismatch = 'StaticError 400 "mls-welcome-misma

type instance MapError 'MLSMissingGroupInfo = 'StaticError 404 "mls-missing-group-info" "The conversation has no group information"

type instance MapError 'MLSMissingExternalInit = 'StaticError 400 "mls-missing-external-init" "The external commit is missing an external init proposal"

type instance MapError 'MLSRemovalUserMismatch = 'StaticError 403 "mls-removal-user-mismatch" "The external commit attempts to remove a client from a user other than themselves"

type instance MapError 'MLSExternalCommitRemoveProposal = 'StaticError 403 "mls-external-commit-proposals" "The external commit has to have at most one remove proposal"
Comment thread
mdimjasevic marked this conversation as resolved.
Outdated

Comment thread
mdimjasevic marked this conversation as resolved.
Outdated
type instance MapError 'NoBindingTeamMembers = 'StaticError 403 "non-binding-team-members" "Both users must be members of the same binding team"

type instance MapError 'NoBindingTeam = 'StaticError 403 "no-binding-team" "Operation allowed only on binding teams"
Expand Down
2 changes: 1 addition & 1 deletion libs/wire-api/src/Wire/API/MLS/Message.hs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ instance SerialiseMLS (Sender 'MLSPlainText) where
serialiseMLS (PreconfiguredSender x) = do
serialiseMLS PreconfiguredSenderTag
put x
serialiseMLS NewMemberSender = serialiseMLS NewMemberSender
serialiseMLS NewMemberSender = serialiseMLS NewMemberSenderTag

data family MessagePayload (tag :: WireFormatTag) :: *

Expand Down
9 changes: 9 additions & 0 deletions libs/wire-api/src/Wire/API/Routes/Public/Galley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,7 @@ type MLSMessagingAPI =
:> CanThrow 'LegalHoldNotEnabled
:> CanThrow 'MLSClientMismatch
:> CanThrow 'MLSCommitMissingReferences
:> CanThrow 'MLSExternalCommitRemoveProposal
:> CanThrow 'MLSKeyPackageRefNotFound
:> CanThrow 'MLSProposalNotFound
:> CanThrow 'MLSProtocolErrorTag
Expand All @@ -1370,6 +1371,8 @@ type MLSMessagingAPI =
:> CanThrow 'MLSUnsupportedProposal
:> CanThrow 'MLSClientSenderUserMismatch
:> CanThrow 'MLSGroupConversationMismatch
:> CanThrow 'MLSMissingExternalInit
:> CanThrow 'MLSRemovalUserMismatch
:> CanThrow 'MissingLegalholdConsent
:> CanThrow MLSProposalFailure
:> "messages"
Expand All @@ -1387,6 +1390,7 @@ type MLSMessagingAPI =
:> CanThrow 'LegalHoldNotEnabled
:> CanThrow 'MLSClientMismatch
:> CanThrow 'MLSCommitMissingReferences
:> CanThrow 'MLSExternalCommitRemoveProposal
:> CanThrow 'MLSKeyPackageRefNotFound
:> CanThrow 'MLSProposalNotFound
:> CanThrow 'MLSProtocolErrorTag
Expand All @@ -1396,6 +1400,8 @@ type MLSMessagingAPI =
:> CanThrow 'MLSUnsupportedProposal
:> CanThrow 'MLSClientSenderUserMismatch
:> CanThrow 'MLSGroupConversationMismatch
:> CanThrow 'MLSMissingExternalInit
:> CanThrow 'MLSRemovalUserMismatch
:> CanThrow 'MissingLegalholdConsent
:> CanThrow MLSProposalFailure
:> "messages"
Expand All @@ -1413,6 +1419,7 @@ type MLSMessagingAPI =
:> CanThrow 'LegalHoldNotEnabled
:> CanThrow 'MLSClientMismatch
:> CanThrow 'MLSCommitMissingReferences
:> CanThrow 'MLSExternalCommitRemoveProposal
:> CanThrow 'MLSKeyPackageRefNotFound
:> CanThrow 'MLSProposalNotFound
:> CanThrow 'MLSProtocolErrorTag
Expand All @@ -1423,6 +1430,8 @@ type MLSMessagingAPI =
:> CanThrow 'MLSClientSenderUserMismatch
:> CanThrow 'MLSGroupConversationMismatch
:> CanThrow 'MLSWelcomeMismatch
:> CanThrow 'MLSMissingExternalInit
:> CanThrow 'MLSRemovalUserMismatch
:> CanThrow 'MissingLegalholdConsent
:> CanThrow MLSProposalFailure
:> "commit-bundles"
Expand Down
6 changes: 3 additions & 3 deletions nix/pkgs/mls-test-cli/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "wireapp";
repo = "mls-test-cli";
sha256 = "sha256-xYL9KNcirCARb1Rp41einOpq0ut5adlqMIAEiwYXkzg=";
rev = "d46624fb49c900facc8853fa86e3ecf51fd0dcdb";
sha256 = "sha256-/XQ/9oQTPkRqgMzDGRm+Oh9jgkdeDM1vRJ6/wEf2+bY=";
rev = "c6f80be2839ac1ed2894e96044541d1c3cf6ecdf";
};
doCheck = false;
cargoSha256 = "sha256-FGFyS/tLlD+3JQX7vkKq4nW+WQI1FFnpugzfFBi/eQE=";
cargoSha256 = "sha256-AlZrxa7f5JwxxrzFBgeFSaYU6QttsUpfLYfq1HzsdbE=";
cargoDepsHook = ''
mkdir -p mls-test-cli-${version}-vendor.tar.gz/ring/.git
'';
Expand Down
Loading