From 418415d56f01ed3bc8011e2015148c7c0b855451 Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Sat, 10 Jan 2026 21:53:49 +0530 Subject: [PATCH] Update group draft on member selection and unselection --- src/pages/NewChatPage.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pages/NewChatPage.tsx b/src/pages/NewChatPage.tsx index 52e05cf17f1d..05a3f9f30224 100755 --- a/src/pages/NewChatPage.tsx +++ b/src/pages/NewChatPage.tsx @@ -323,8 +323,22 @@ function NewChatPage({ref}: NewChatPageProps) { selectionListRef.current?.focusTextInput(); } setSelectedOptions(newSelectedOptions); + + if (personalData?.login && personalData?.accountID) { + const participants: SelectedParticipant[] = [ + ...newSelectedOptions.map((selectedOption) => ({ + login: selectedOption.login, + accountID: selectedOption.accountID ?? CONST.DEFAULT_NUMBER_ID, + })), + { + login: personalData.login, + accountID: personalData.accountID, + }, + ]; + setGroupDraft({participants}); + } }, - [selectedOptions, setSelectedOptions], + [selectedOptions, setSelectedOptions, personalData?.accountID, personalData?.login], ); /**