From 25b96800bb2e715416dade427aac4da5584e50ad 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));