1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 13:48:12 +09:00
This commit is contained in:
syuilo 2018-12-06 16:30:28 +09:00
parent 5d3d8dffd6
commit 3555213155
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -100,15 +100,19 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
text += `\n\n[投票を見る](${url})`;
}
let apText = text;
if (note.renoteId != null) {
if (text == null) text = '';
if (apText == null) apText = '';
const url = `${config.url}/notes/${note.renoteId}`;
text += `\n\nRE: ${url}`;
apText += `\n\nRE: ${url}`;
}
const summary = note.cw === '' ? String.fromCharCode(0x200B) : note.cw;
const content = toHtml(Object.assign({}, note, { text }));
const content = toHtml(Object.assign({}, note, {
text: apText
}));
const emojis = await getEmojis(note.emojis);
const apemojis = emojis.map(emoji => renderEmoji(emoji));