diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 7c7e8d9a08..a85e72c5f9 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -594,10 +594,13 @@ function saveReply(reply: Note, note: Note) { } function incNotesCountOfUser(user: User) { - Users.increment({ id: user.id }, 'notesCount', 1); - Users.update({ id: user.id }, { - updatedAt: new Date() - }); + Users.createQueryBuilder().update() + .set({ + updatedAt: new Date(), + notesCount: () => '"notesCount" + 1' + }) + .where('id = :id', { id: user.id }) + .execute(); } async function extractMentionedUsers(user: User, tokens: ReturnType): Promise {