feat(web): normalize moderation filters for @username input
Some checks failed
CI / test (push) Failing after 2m13s
Some checks failed
CI / test (push) Failing after 2m13s
This commit is contained in:
@@ -104,7 +104,7 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
);
|
||||
const allAttachmentItems = useMemo(() => [...attachments].sort((a, b) => b.id - a.id), [attachments]);
|
||||
const filteredMembers = useMemo(() => {
|
||||
const query = memberFilter.trim().toLowerCase();
|
||||
const query = memberFilter.trim().replace(/^@+/, "").toLowerCase();
|
||||
if (!query) {
|
||||
return members;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
});
|
||||
}, [memberFilter, members, memberUsers]);
|
||||
const filteredBans = useMemo(() => {
|
||||
const query = bannedFilter.trim().toLowerCase();
|
||||
const query = bannedFilter.trim().replace(/^@+/, "").toLowerCase();
|
||||
if (!query) {
|
||||
return bans;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user