merge: allow lookup / search for `http` URLs (!457)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/457

Approved-by: Luna <her@mint.lgbt>
Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
This commit is contained in:
Amelia Yukii 2024-03-04 20:20:53 +00:00
commit 061cc40384
3 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ async function search() {
if (query == null || query === '') return; if (query == null || query === '') return;
if (query.startsWith('https://')) { if (query.startsWith('http://') || query.startsWith('https://')) {
const promise = misskeyApi('ap/show', { const promise = misskeyApi('ap/show', {
uri: query, uri: query,
}); });

View File

@ -48,7 +48,7 @@ async function search() {
if (query == null || query === '') return; if (query == null || query === '') return;
if (query.startsWith('https://')) { if (query.startsWith('http://') || query.startsWith('https://')) {
const promise = misskeyApi('ap/show', { const promise = misskeyApi('ap/show', {
uri: query, uri: query,
}); });

View File

@ -28,7 +28,7 @@ export async function lookup(router?: Router) {
return; return;
} }
if (query.startsWith('https://')) { if (query.startsWith('http://') || query.startsWith('https://')) {
const promise = misskeyApi('ap/show', { const promise = misskeyApi('ap/show', {
uri: query, uri: query,
}); });