diff --git a/changelog.d/5-internal/multiple-messages b/changelog.d/5-internal/multiple-messages new file mode 100644 index 0000000000..38543a8906 --- /dev/null +++ b/changelog.d/5-internal/multiple-messages @@ -0,0 +1 @@ +Update group state after application message diff --git a/integration/test/MLS/Util.hs b/integration/test/MLS/Util.hs index 68feacee6d..10dbd41724 100644 --- a/integration/test/MLS/Util.hs +++ b/integration/test/MLS/Util.hs @@ -724,7 +724,7 @@ createApplicationMessage cid messageContent = do message <- mlscli cid - ["message", "--group", "", messageContent] + ["message", "--group-in", "", messageContent, "--group-out", ""] Nothing pure diff --git a/integration/test/Test/MLS/Message.hs b/integration/test/Test/MLS/Message.hs index 762278f8de..f4bfef3e58 100644 --- a/integration/test/Test/MLS/Message.hs +++ b/integration/test/Test/MLS/Message.hs @@ -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 diff --git a/libs/wire-api/test/unit/Test/Wire/API/MLS.hs b/libs/wire-api/test/unit/Test/Wire/API/MLS.hs index efd3fa48a5..74652d8662 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/MLS.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/MLS.hs @@ -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) diff --git a/nix/pkgs/mls-test-cli/default.nix b/nix/pkgs/mls-test-cli/default.nix index 2ba2d12657..832690a70d 100644 --- a/nix/pkgs/mls-test-cli/default.nix +++ b/nix/pkgs/mls-test-cli/default.nix @@ -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 { @@ -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="; }; diff --git a/services/galley/test/integration/API/MLS/Util.hs b/services/galley/test/integration/API/MLS/Util.hs index 435c4f0c6a..f15e326db3 100644 --- a/services/galley/test/integration/API/MLS/Util.hs +++ b/services/galley/test/integration/API/MLS/Util.hs @@ -647,7 +647,7 @@ createApplicationMessage cid messageContent = do message <- mlscli cid - ["message", "--group", "", messageContent] + ["message", "--group-in", "", messageContent, "--group-out", ""] Nothing pure $