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/3-bug-fixes/sender-welcome
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Welcome messages are not sent anymore to the creator of an MLS group on the first commit
7 changes: 3 additions & 4 deletions integration/test/Test/MLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ testMixedProtocolAddUsers secondDomain = do

traverse_ uploadNewKeyPackage [bob1]

withWebSockets [alice, bob] $ \wss -> do
withWebSocket bob $ \ws -> do
mp <- createAddCommit alice1 [bob]
welcome <- assertJust "should have welcome" mp.welcome
void $ sendAndConsumeCommitBundle mp
for_ wss $ \ws -> do
n <- awaitMatch 3 (\n -> nPayload n %. "type" `isEqual` "conversation.mls-welcome") ws
nPayload n %. "data" `shouldMatch` T.decodeUtf8 (Base64.encode welcome)
n <- awaitMatch 3 (\n -> nPayload n %. "type" `isEqual` "conversation.mls-welcome") ws
nPayload n %. "data" `shouldMatch` T.decodeUtf8 (Base64.encode welcome)

testMixedProtocolUserLeaves :: HasCallStack => Domain -> App ()
testMixedProtocolUserLeaves secondDomain = do
Expand Down
5 changes: 4 additions & 1 deletion services/galley/src/Galley/API/MLS/Message.hs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ postMLSCommitBundleToLocalConv qusr c conn bundle ctype lConvOrSubId = do
bundle.epoch
action
bundle.commit.value
pure (events, cmIdentities (paAdd action))
-- the sender client is included in the Add action on the first commit,
-- but it doesn't need to get a welcome message, so we filter it out here
let newClients = filter ((/=) senderIdentity) (cmIdentities (paAdd action))
pure (events, newClients)
SenderExternal _ -> throw (mlsProtocolError "Unexpected sender")
SenderNewMemberProposal -> throw (mlsProtocolError "Unexpected sender")
SenderNewMemberCommit -> do
Expand Down