This commit is contained in:
syuilo 2018-06-19 08:03:00 +09:00
parent b07911ec68
commit 01ff8d171a

View File

@ -54,11 +54,11 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
? [`${attributedTo}/followers`].concat(mentions)
: [];
const mentionedUsers = await User.find({
const mentionedUsers = note.mentions ? await User.find({
_id: {
$in: note.mentions
}
});
}) : [];
const hashtagTags = (note.tags || []).map(tag => renderHashtag(tag));
const mentionTags = mentionedUsers.map(u => renderMention(u));