fix: only trigger remove of members that are not in the group

pull/3281/head
Audric Ackermann 3 months ago
parent 1f39533abd
commit 73bb96665e
No known key found for this signature in database

@ -175,11 +175,15 @@ export const UpdateGroupMembersDialog = (props: Props) => {
const onClickOK = async () => {
if (PubKey.is03Pubkey(conversationId)) {
const toRemoveAndCurrentMembers = membersToRemove.filter(m =>
existingMembers.includes(m as PubkeyType)
);
const groupv2Action = groupInfoActions.currentDeviceGroupMembersChange({
groupPk: conversationId,
addMembersWithHistory: [],
addMembersWithoutHistory: [],
removeMembers: membersToRemove as Array<PubkeyType>,
removeMembers: toRemoveAndCurrentMembers as Array<PubkeyType>,
alsoRemoveMessages,
});
dispatch(groupv2Action as any);

Loading…
Cancel
Save