mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-02 16:58:06 +09:00
Refactor
This commit is contained in:
parent
f4eb62cd3b
commit
f0b9703a77
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user