LP-5676: fixed the ability to add a user to a shared channel

This commit is contained in:
Дмитрий Пиченикин 2026-03-13 15:28:48 +03:00
parent 47fbaef659
commit 3e8879245b

View File

@ -102,7 +102,7 @@ const UserMultiSelect: React.FC<Props> = ({value, onChange, placeholder, disable
setLoading(true); setLoading(true);
try { try {
const data = await Client4.autocompleteUsers(term, '', '', {limit: 20}); const data = await Client4.autocompleteUsers(term, '', '', {limit: 20});
setResults(data.users.filter((u: UserProfile) => !excluded.has(u.username))); setResults(data.users.filter((u) => !excluded.has(u.username) && !(u as UserProfile & {remote_id?: string}).remote_id));
} catch { } catch {
setResults([]); setResults([]);
} finally { } finally {
@ -110,7 +110,7 @@ const UserMultiSelect: React.FC<Props> = ({value, onChange, placeholder, disable
} }
}; };
const doSearch = useMemo(() => debounce(performSearch, 400), []); // eslint-disable-line react-hooks/exhaustive-deps const doSearch = useMemo(() => debounce(performSearch, 400), []);
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => { const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const term = e.target.value; const term = e.target.value;