diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-19 08:03:00 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-19 08:03:00 +0900 |
| commit | 01ff8d171a86622a35572aa8264b9860fca7a841 (patch) | |
| tree | 14e22c88611050a4e570e7a057ce1ce56fd04fa0 /src | |
| parent | Fix (diff) | |
| download | sharkey-01ff8d171a86622a35572aa8264b9860fca7a841.tar.gz sharkey-01ff8d171a86622a35572aa8264b9860fca7a841.tar.bz2 sharkey-01ff8d171a86622a35572aa8264b9860fca7a841.zip | |
Fix bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/remote/activitypub/renderer/note.ts | 4 |
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)); |