feat(web): exclude banned users from add-member search
Some checks are pending
CI / test (push) Has started running

This commit is contained in:
2026-03-08 22:37:45 +03:00
parent 794dcece29
commit 15c7b7ac43
2 changed files with 8 additions and 2 deletions

View File

@@ -669,7 +669,13 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
}
try {
const users = await searchUsers(value);
setSearchResults(users.filter((u) => !members.some((m) => m.user_id === u.id)));
setSearchResults(
users.filter(
(u) =>
!members.some((m) => m.user_id === u.id) &&
!bans.some((ban) => ban.user_id === u.id)
)
);
} catch {
setError("Failed to search users");
}