From 7982f2bf4767c7d958b44c529e5b1eddb2cd8d93 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 14 Jun 2020 10:26:13 +0900 Subject: [PATCH] =?UTF-8?q?AP=E5=90=91=E3=81=91=E3=81=AE=E3=82=A2=E3=83=B3?= =?UTF-8?q?=E3=82=B1=E3=83=BC=E3=83=88=E3=81=AEfallback=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=AF=E3=81=AA=E3=81=A9=E3=82=92=E5=89=8A=E9=99=A4=20(#6466?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remote/activitypub/renderer/note.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts index 5b00f8295..6878a402b 100644 --- a/src/remote/activitypub/renderer/note.ts +++ b/src/remote/activitypub/renderer/note.ts @@ -85,32 +85,16 @@ export default async function renderNote(note: Note, dive = true, isTalk = false const files = await getPromisedFiles(note.fileIds); - let text = note.text; + const text = note.text; let poll: Poll | undefined; if (note.hasPoll) { poll = await Polls.findOne({ noteId: note.id }); } - if (poll) { - if (text == null) text = ''; - const url = `${config.url}/notes/${note.id}`; - // TODO: i18n - text += `\n[リモートで結果を表示](${url})`; - } - let apText = text; if (apText == null) apText = ''; - // Provides choices as text for AP - if (poll) { - const cs = poll.choices.map((c, i) => `${i}: ${c}`); - apText += '\n----------------------------------------\n'; - apText += cs.join('\n'); - apText += '\n----------------------------------------\n'; - apText += '番号を返信して投票'; - } - if (quote) { apText += `\n\nRE: ${quote}`; } @@ -135,7 +119,6 @@ export default async function renderNote(note: Note, dive = true, isTalk = false content: toHtml(Object.assign({}, note, { text: text })), - _misskey_fallback_content: content, [poll.expiresAt && poll.expiresAt < new Date() ? 'closed' : 'endTime']: poll.expiresAt, [poll.multiple ? 'anyOf' : 'oneOf']: poll.choices.map((text, i) => ({ type: 'Note',