Skip to content
Snippets Groups Projects
Commit 5773a5bf authored by syuilo's avatar syuilo
Browse files

Refactor

parent 8f84dd61
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment