fix(frontend): search user with trailing space (#11184)
* fix(frontend): search user with trailing space * fix(backend): search user with trailing space * Update search.ts --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@@ -67,7 +67,7 @@ async function search() {
|
||||
endpoint: 'users/search',
|
||||
limit: 10,
|
||||
params: {
|
||||
query: searchQuery,
|
||||
query: query,
|
||||
origin: searchOrigin,
|
||||
},
|
||||
};
|
||||
|
@@ -6,9 +6,10 @@ import { Router } from '@/nirax';
|
||||
export async function lookup(router?: Router) {
|
||||
const _router = router ?? mainRouter;
|
||||
|
||||
const { canceled, result: query } = await os.inputText({
|
||||
const { canceled, result: temp } = await os.inputText({
|
||||
title: i18n.ts.lookup,
|
||||
});
|
||||
const query = temp ? temp.trim() : '';
|
||||
if (canceled) return;
|
||||
|
||||
if (query.startsWith('@') && !query.includes(' ')) {
|
||||
|
Reference in New Issue
Block a user