Do not display deactivated users to add channel members (#7767)

This commit is contained in:
Elias Nahum 2024-01-19 06:37:07 +08:00 committed by GitHub
parent f5988f0ddc
commit 1584208536
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -201,7 +201,7 @@ export default function ChannelAddMembers({
const result = await fetchProfilesNotInChannel(serverUrl, channel.teamId, channel.id, channel.isGroupConstrained, page, General.PROFILE_CHUNK_SIZE);
if (result.users?.length) {
return result.users;
return result.users.filter((u) => !u.delete_at);
}
return [];
@ -213,7 +213,7 @@ export default function ChannelAddMembers({
}
const lowerCasedTerm = searchTerm.toLowerCase();
const results = await searchProfiles(serverUrl, lowerCasedTerm, {team_id: channel.teamId, not_in_channel_id: channel.id, allow_inactive: true});
const results = await searchProfiles(serverUrl, lowerCasedTerm, {team_id: channel.teamId, not_in_channel_id: channel.id, allow_inactive: false});
if (results.data) {
return results.data;