From 85a0f696bcea779b02749dae596fff94a1df2467 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 18 Oct 2020 01:46:40 +0900 Subject: ActivityPubでリモートのオブジェクトをGETするときのリクエストをHTTP Signatureで署名するオプション (#6731) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Sign ActivityPub GET * Fix v12, v12.48.0 UI bug --- src/client/pages/follow.vue | 8 ++++++-- src/client/scripts/search.ts | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/client') diff --git a/src/client/pages/follow.vue b/src/client/pages/follow.vue index 35d5cc3b26..13e0a62a0d 100644 --- a/src/client/pages/follow.vue +++ b/src/client/pages/follow.vue @@ -12,6 +12,7 @@ export default defineComponent({ const acct = new URL(location.href).searchParams.get('acct'); if (acct == null) return; + /* const dialog = os.dialog({ type: 'waiting', text: this.$t('fetchingAsApObject') + '...', @@ -19,6 +20,7 @@ export default defineComponent({ showCancelButton: false, cancelableByBgClick: false }); + */ if (acct.startsWith('https://')) { os.api('ap/show', { @@ -26,6 +28,8 @@ export default defineComponent({ }).then(res => { if (res.type == 'User') { this.follow(res.object); + } else if (res.type === 'Note') { + this.$router.push(`/notes/${res.object.id}`); } else { os.dialog({ type: 'error', @@ -42,7 +46,7 @@ export default defineComponent({ window.close(); }); }).finally(() => { - dialog.close(); + //dialog.close(); }); } else { os.api('users/show', parseAcct(acct)).then(user => { @@ -55,7 +59,7 @@ export default defineComponent({ window.close(); }); }).finally(() => { - dialog.close(); + //dialog.close(); }); } }, diff --git a/src/client/scripts/search.ts b/src/client/scripts/search.ts index 45cc691fe4..fbdc32dfb1 100644 --- a/src/client/scripts/search.ts +++ b/src/client/scripts/search.ts @@ -48,6 +48,7 @@ export async function search(q?: string | null | undefined) { } if (q.startsWith('https://')) { + /* const dialog = os.dialog({ type: 'waiting', text: i18n.global.t('fetchingAsApObject') + '...', @@ -55,19 +56,20 @@ export async function search(q?: string | null | undefined) { showCancelButton: false, cancelableByBgClick: false }); + */ try { const res = await os.api('ap/show', { uri: q }); - dialog.cancel(); + //dialog.cancel(); if (res.type === 'User') { router.push(`/@${res.object.username}@${res.object.host}`); } else if (res.type === 'Note') { router.push(`/notes/${res.object.id}`); } } catch (e) { - dialog.cancel(); + //dialog.cancel(); // TODO: Show error } -- cgit v1.2.3-freya