diff --git a/packages/frontend/src/pages/search.note.vue b/packages/frontend/src/pages/search.note.vue index 3945baa00a..1964de7159 100644 --- a/packages/frontend/src/pages/search.note.vue +++ b/packages/frontend/src/pages/search.note.vue @@ -74,27 +74,29 @@ async function search() { if (query == null || query === '') return; - if (query.startsWith('https://')) { - const promise = misskeyApi('ap/show', { - uri: query, - }); + if (!user.value && !isLocalOnly.value) { + if (query.startsWith('https://')) { + const promise = misskeyApi('ap/show', { + uri: query, + }); - os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject); + os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject); - const res = await promise; + const res = await promise; - if (res.type === 'User') { - router.push(`/@${res.object.username}@${res.object.host}`); - } else if (res.type === 'Note') { - router.push(`/notes/${res.object.id}`); + if (res.type === 'User') { + router.push(`/@${res.object.username}@${res.object.host}`); + } else if (res.type === 'Note') { + router.push(`/notes/${res.object.id}`); + } + + return; } - return; - } - - if (query.startsWith('#') && query.length > 1) { - router.push(`/tags/${encodeURIComponent(query.substring(1))}`); - return; + if (query.startsWith('#') && query.length > 1) { + router.push(`/tags/${encodeURIComponent(query.substring(1))}`); + return; + } } notePagination.value = { diff --git a/packages/frontend/src/pages/search.user.vue b/packages/frontend/src/pages/search.user.vue index b8a41bfd95..bd5613418b 100644 --- a/packages/frontend/src/pages/search.user.vue +++ b/packages/frontend/src/pages/search.user.vue @@ -48,27 +48,30 @@ async function search() { if (query == null || query === '') return; - if (query.startsWith('https://')) { - const promise = misskeyApi('ap/show', { - uri: query, - }); + if (searchOrigin.value === 'combined') { - os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject); + if (query.startsWith('https://')) { + const promise = misskeyApi('ap/show', { + uri: query, + }); - const res = await promise; + os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject); - if (res.type === 'User') { - router.push(`/@${res.object.username}@${res.object.host}`); - } else if (res.type === 'Note') { - router.push(`/notes/${res.object.id}`); + const res = await promise; + + if (res.type === 'User') { + router.push(`/@${res.object.username}@${res.object.host}`); + } else if (res.type === 'Note') { + router.push(`/notes/${res.object.id}`); + } + + return; } - return; - } - - if (query.startsWith('#') && query.length > 1) { - router.push(`/user-tags/${encodeURIComponent(query.substring(1))}`); - return; + if (query.startsWith('#') && query.length > 1) { + router.push(`/user-tags/${encodeURIComponent(query.substring(1))}`); + return; + } } userPagination.value = {