From 96d8432b8530c028269781e74604f197aad63ccb Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 3 Mar 2024 14:45:34 +0000 Subject: [PATCH] allow lookup / search for `http` URLs --- packages/frontend/src/pages/search.note.vue | 2 +- packages/frontend/src/pages/search.user.vue | 2 +- packages/frontend/src/scripts/lookup.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/pages/search.note.vue b/packages/frontend/src/pages/search.note.vue index 33de0d72cf..525e71cf00 100644 --- a/packages/frontend/src/pages/search.note.vue +++ b/packages/frontend/src/pages/search.note.vue @@ -85,7 +85,7 @@ async function search() { if (query == null || query === '') return; - if (query.startsWith('https://')) { + if (query.startsWith('http://') || query.startsWith('https://')) { const promise = misskeyApi('ap/show', { uri: query, }); diff --git a/packages/frontend/src/pages/search.user.vue b/packages/frontend/src/pages/search.user.vue index dad9cd910a..8dda3b5b02 100644 --- a/packages/frontend/src/pages/search.user.vue +++ b/packages/frontend/src/pages/search.user.vue @@ -48,7 +48,7 @@ async function search() { if (query == null || query === '') return; - if (query.startsWith('https://')) { + if (query.startsWith('http://') || query.startsWith('https://')) { const promise = misskeyApi('ap/show', { uri: query, }); diff --git a/packages/frontend/src/scripts/lookup.ts b/packages/frontend/src/scripts/lookup.ts index 7f020b15cc..db3a96b15c 100644 --- a/packages/frontend/src/scripts/lookup.ts +++ b/packages/frontend/src/scripts/lookup.ts @@ -28,7 +28,7 @@ export async function lookup(router?: Router) { return; } - if (query.startsWith('https://')) { + if (query.startsWith('http://') || query.startsWith('https://')) { const promise = misskeyApi('ap/show', { uri: query, });