Refactor
This commit is contained in:
parent
8f84dd610c
commit
5773a5bfa6
1 changed files with 3 additions and 3 deletions
|
@ -54,14 +54,14 @@ export default async function renderNote(note: INote, dive = true) {
|
||||||
? [`${attributedTo}/followers`].concat(mentions)
|
? [`${attributedTo}/followers`].concat(mentions)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const mentionUsers = await User.find({
|
const mentionedUsers = await User.find({
|
||||||
_id: {
|
_id: {
|
||||||
$in: note.mentions
|
$in: note.mentions
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const hashtagTags = (note.tags || []).map(renderHashtag);
|
const hashtagTags = (note.tags || []).map(tag => renderHashtag(tag));
|
||||||
const mentionTags = mentionUsers.map(renderMention);
|
const mentionTags = mentionedUsers.map(u => renderMention(u));
|
||||||
const tag = [
|
const tag = [
|
||||||
...hashtagTags,
|
...hashtagTags,
|
||||||
...mentionTags,
|
...mentionTags,
|
||||||
|
|
Loading…
Reference in a new issue