summaryrefslogtreecommitdiff
path: root/src/remote/activitypub
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-19 08:03:00 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-19 08:03:00 +0900
commit01ff8d171a86622a35572aa8264b9860fca7a841 (patch)
tree14e22c88611050a4e570e7a057ce1ce56fd04fa0 /src/remote/activitypub
parentFix (diff)
downloadsharkey-01ff8d171a86622a35572aa8264b9860fca7a841.tar.gz
sharkey-01ff8d171a86622a35572aa8264b9860fca7a841.tar.bz2
sharkey-01ff8d171a86622a35572aa8264b9860fca7a841.zip
Fix bug
Diffstat (limited to 'src/remote/activitypub')
-rw-r--r--src/remote/activitypub/renderer/note.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts
index b908f8bb1e..7cee2be22c 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<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));