perf(server): reduce db query
This commit is contained in:
parent
131ff24e53
commit
21de5c4a9c
|
@ -53,9 +53,7 @@ export default async function renderNote(note: Note, dive = true, isTalk = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = await Users.findOneOrFail(note.userId);
|
const attributedTo = `${config.url}/users/${note.userId}`;
|
||||||
|
|
||||||
const attributedTo = `${config.url}/users/${user.id}`;
|
|
||||||
|
|
||||||
const mentions = (JSON.parse(note.mentionedRemoteUsers) as IMentionedRemoteUsers).map(x => x.uri);
|
const mentions = (JSON.parse(note.mentionedRemoteUsers) as IMentionedRemoteUsers).map(x => x.uri);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue