perf(server): refactor and performance improvements
This commit is contained in:
parent
22b56ac65c
commit
ac8c66f5ab
71 changed files with 289 additions and 189 deletions
|
|
@ -20,7 +20,7 @@ import { Brackets, In } from 'typeorm';
|
|||
* @param user 投稿者
|
||||
* @param note 投稿
|
||||
*/
|
||||
export default async function(user: User, note: Note, quiet = false) {
|
||||
export default async function(user: { id: User['id']; uri: User['uri']; host: User['host']; }, note: Note, quiet = false) {
|
||||
const deletedAt = new Date();
|
||||
|
||||
// この投稿を除く指定したユーザーによる指定したノートのリノートが存在しないとき
|
||||
|
|
@ -131,7 +131,7 @@ async function getMentionedRemoteUsers(note: Note) {
|
|||
}) as IRemoteUser[];
|
||||
}
|
||||
|
||||
async function deliverToConcerned(user: ILocalUser, note: Note, content: any) {
|
||||
async function deliverToConcerned(user: { id: ILocalUser['id']; host: null; }, note: Note, content: any) {
|
||||
deliverToFollowers(user, content);
|
||||
deliverToRelays(user, content);
|
||||
const remoteUsers = await getMentionedRemoteUsers(note);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue