make username matching consistent between lookup.ts and search.user.vue

This commit is contained in:
Hazelnoot 2025-04-13 19:55:20 -04:00
parent 423fdded14
commit 2d04c76260

View file

@ -18,7 +18,7 @@ export async function lookup(router?: Router) {
const query = temp ? temp.trim() : ''; const query = temp ? temp.trim() : '';
if (canceled || query.length <= 1) return; if (canceled || query.length <= 1) return;
if (query.startsWith('@') && !query.includes(' ')) { if (query.match(/^@[a-z0-9_.-]+@[a-z0-9_.-]+$/i)) {
_router.push(`/${query}`); _router.push(`/${query}`);
return; return;
} }