Skip to content

Commit

Permalink
Merge branch 'rm/319793' into 'master'
Browse files Browse the repository at this point in the history
Fix: filter duplicates within add user to channel modal

See merge request kchat/webapp!682
  • Loading branch information
antonbuks committed Apr 2, 2024
2 parents 0703c9c + 445363a commit 0c5e837
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,16 @@ export default class ChannelInviteModal extends React.PureComponent<Props, State
excludedAndNotInTeamUserIds).
slice(0, USERS_FROM_DMS) as UserProfileValue[],
...users,
].
].filter((v, index, self) => {
return index === self.findIndex((t) => (
t.id === v.id
));
}).
slice(0, MAX_USERS).map(((u) => {
if (idsInGroup.includes(u.id)) {
return {...u, disabled: true}
return {...u, disabled: true};
}
return u
return u;
}));

users = Array.from(new Set(users));
Expand Down

0 comments on commit 0c5e837

Please sign in to comment.