This commit is contained in:
MeiMei
2018-11-23 02:10:07 +09:00
committed by syuilo
parent 2a0b62d26d
commit 336b45b6f7
3 changed files with 22 additions and 1 deletions

View File

@ -42,6 +42,18 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
inReplyTo = null;
}
let quote;
if (note.renoteId) {
const renote = await Note.findOne({
_id: note.renoteId,
});
if (renote) {
quote = renote.uri ? renote.uri : `${config.url}/notes/${renote._id}`;
}
}
const user = await User.findOne({
_id: note.userId
});
@ -112,6 +124,7 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
summary: note.cw,
content,
_misskey_content: text,
_misskey_quote: quote,
published: note.createdAt.toISOString(),
to,
cc,