summaryrefslogtreecommitdiff
path: root/src/remote
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-17 17:15:03 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-17 17:15:03 +0900
commit5773a5bfa6fd167dc3d4ce594647687488b8680d (patch)
tree369fa848e0114fb24a9dbe19957404934e3b4ef3 /src/remote
parentUse ' (diff)
downloadsharkey-5773a5bfa6fd167dc3d4ce594647687488b8680d.tar.gz
sharkey-5773a5bfa6fd167dc3d4ce594647687488b8680d.tar.bz2
sharkey-5773a5bfa6fd167dc3d4ce594647687488b8680d.zip
Refactor
Diffstat (limited to 'src/remote')
-rw-r--r--src/remote/activitypub/renderer/note.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts
index f9e559d307..556054fa93 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,