summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2020-06-14 10:26:13 +0900
committerGitHub <noreply@github.com>2020-06-14 10:26:13 +0900
commit1726ff397797923bbe422736b4511a3d29ec9fed (patch)
tree31b689162ad760915303a29b6fa301219a51ebde /src
parentアカウント切り替え後にインスタンス設定の表示値が変... (diff)
downloadmisskey-1726ff397797923bbe422736b4511a3d29ec9fed.tar.gz
misskey-1726ff397797923bbe422736b4511a3d29ec9fed.tar.bz2
misskey-1726ff397797923bbe422736b4511a3d29ec9fed.zip
AP向けのアンケートのfallbackリンクなどを削除 (#6466)
Diffstat (limited to 'src')
-rw-r--r--src/remote/activitypub/renderer/note.ts19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts
index 5b00f82958..6878a402b8 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',