summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/renderer
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-17 11:59:24 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-17 11:59:24 +0900
commitf97cdfaa2099ab4c29b980693d3caa5c828d64a4 (patch)
tree86d726c6a08b12a864a369911199fdd4a7013ea8 /src/remote/activitypub/renderer
parentAdd untilId param (diff)
downloadsharkey-f97cdfaa2099ab4c29b980693d3caa5c828d64a4.tar.gz
sharkey-f97cdfaa2099ab4c29b980693d3caa5c828d64a4.tar.bz2
sharkey-f97cdfaa2099ab4c29b980693d3caa5c828d64a4.zip
Fix #2725
Diffstat (limited to 'src/remote/activitypub/renderer')
-rw-r--r--src/remote/activitypub/renderer/note.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts
index 5d28e5f450..3ed6a6e16a 100644
--- a/src/remote/activitypub/renderer/note.ts
+++ b/src/remote/activitypub/renderer/note.ts
@@ -82,6 +82,20 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
const files = await promisedFiles;
+ if (note.poll != null) {
+ if (note.text == null) note.text = '';
+ const url = `${config.url}/notes/${note._id}`;
+ // TODO: i18n
+ note.text += `\n\n[投票を見る](${url})`;
+ }
+
+ if (note.renoteId != null) {
+ if (note.text == null) note.text = '';
+ const url = `${config.url}/notes/${note.renoteId}`;
+ note.text += `\n\nRE: ${url}`;
+ }
+
+ // 省略されたメンションのホストを復元する
const text = note.text ? parseMfm(note.text).map(x => {
if (x.type == 'mention' && x.host == null) {
return `${x.content}@${config.host}`;