From 01ff8d171a86622a35572aa8264b9860fca7a841 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 19 Jun 2018 08:03:00 +0900 Subject: [PATCH] Fix bug --- src/remote/activitypub/renderer/note.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts index b908f8bb1..7cee2be22 100644 --- a/src/remote/activitypub/renderer/note.ts +++ b/src/remote/activitypub/renderer/note.ts @@ -54,11 +54,11 @@ export default async function renderNote(note: INote, dive = true): Promise ? [`${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));