From f0b9703a776e8677fd9f834e4d9f23cc409e1460 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jun 2018 17:15:03 +0900 Subject: [PATCH] Refactor --- src/remote/activitypub/renderer/note.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts index f9e559d30..556054fa9 100644 --- a/src/remote/activitypub/renderer/note.ts +++ b/src/remote/activitypub/renderer/note.ts @@ -54,14 +54,14 @@ export default async function renderNote(note: INote, dive = true) { ? [`${attributedTo}/followers`].concat(mentions) : []; - const mentionUsers = await User.find({ + const mentionedUsers = await User.find({ _id: { $in: note.mentions } }); - const hashtagTags = (note.tags || []).map(renderHashtag); - const mentionTags = mentionUsers.map(renderMention); + const hashtagTags = (note.tags || []).map(tag => renderHashtag(tag)); + const mentionTags = mentionedUsers.map(u => renderMention(u)); const tag = [ ...hashtagTags, ...mentionTags,