Skip to content
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/multiple-messages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update group state after application message
2 changes: 1 addition & 1 deletion integration/test/MLS/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ createApplicationMessage cid messageContent = do
message <-
mlscli
cid
["message", "--group", "<group-in>", messageContent]
["message", "--group-in", "<group-in>", messageContent, "--group-out", "<group-out>"]
Nothing

pure
Expand Down
17 changes: 17 additions & 0 deletions integration/test/Test/MLS/Message.hs
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,20 @@ testMessageNotifications bobDomain = do

get def `shouldMatchInt` (numNotifs + 1)
get def {client = Just bobClient} `shouldMatchInt` (numNotifsClient + 1)

testMultipleMessages :: HasCallStack => App ()
testMultipleMessages = do
[alice, bob] <- createAndConnectUsers [OwnDomain, OtherDomain]
[alice1, bob1] <- traverse (createMLSClient def) [alice, bob]
traverse_ uploadNewKeyPackage [alice1, bob1]
void $ createNewGroup alice1

withWebSockets [bob] $ \wss -> do
void $ createAddCommit alice1 [bob] >>= sendAndConsumeCommitBundle
traverse_ (awaitMatch 10 isMemberJoinNotif) wss

void $ createApplicationMessage alice1 "hello" >>= sendAndConsumeMessage
traverse_ (awaitMatch 10 isNewMLSMessageNotif) wss

void $ createApplicationMessage alice1 "world" >>= sendAndConsumeMessage
traverse_ (awaitMatch 10 isNewMLSMessageNotif) wss
2 changes: 1 addition & 1 deletion libs/wire-api/test/unit/Test/Wire/API/MLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ testParseApplication = do
msgData <- withSystemTempDirectory "mls" $ \tmp -> do
void $ spawn (cli qcid tmp ["init", qcid]) Nothing
groupJSON <- spawn (cli qcid tmp ["group", "create", "Zm9v"]) Nothing
spawn (cli qcid tmp ["message", "--group", "-", "hello"]) (Just groupJSON)
spawn (cli qcid tmp ["message", "--group-in", "-", "hello"]) (Just groupJSON)

msg <- case decodeMLS' @Message msgData of
Left err -> assertFailure (T.unpack err)
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 @@ -11,8 +11,8 @@ let
src = fetchFromGitHub {
owner = "wireapp";
repo = "mls-test-cli";
rev = "e6e6ce0c29f0e48e84b4ccef058130aca0625492";
sha256 = "sha256-J9M8w3GJnULH3spKEuPGCL/t43zb2Wd+YfZ0LY3YITo=";
rev = "baaa5c78411a5bf6d697803276b991523c111631";
sha256 = "sha256-M6bWB5hWl+WSblcH6L+AyGD+7ef9TvRs8wKYq7lJyS8=";
};
cargoLockFile = builtins.toFile "cargo.lock" (builtins.readFile "${src}/Cargo.lock");
in rustPlatform.buildRustPackage rec {
Expand All @@ -23,7 +23,7 @@ in rustPlatform.buildRustPackage rec {
lockFile = cargoLockFile;
outputHashes = {
"hpke-0.10.0" = "sha256-T1+BFwX6allljNZ/8T3mrWhOejnUU27BiWQetqU+0fY=";
"openmls-1.0.0" = "sha256-s1ejM/aicFGvsKY7ajEun1Mc645/k8QVrE8YSbyD3Fg=";
"openmls-1.0.0" = "sha256-tAIm8+IgubNnU2M2A5cxHY5caiEQmisw73I9/cqfvUc=";
"safe_pqc_kyber-0.6.0" = "sha256-Ch1LA+by+ezf5RV0LDSQGC1o+IWKXk8IPvkwSrAos68=";
"tls_codec-0.3.0" = "sha256-IO6tenXKkC14EoUDp/+DtFNOVzDfOlLu8K1EJI7sOzs=";
};
Expand Down
2 changes: 1 addition & 1 deletion services/galley/test/integration/API/MLS/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ createApplicationMessage cid messageContent = do
message <-
mlscli
cid
["message", "--group", "<group-in>", messageContent]
["message", "--group-in", "<group-in>", messageContent, "--group-out", "<group-out>"]
Nothing

pure $
Expand Down