diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 2195ecc55f..53e77b4ef2 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -106,8 +106,6 @@ type Option = { }; export default async (user: User, data: Option, silent = false) => new Promise(async (res, rej) => { - const isFirstNote = user.notesCount === 0; - if (data.createdAt == null) data.createdAt = new Date(); if (data.visibility == null) data.visibility = 'public'; if (data.viaMobile == null) data.viaMobile = false; @@ -195,8 +193,6 @@ export default async (user: User, data: Option, silent = false) => new Promise new Promise new Promise { - nm.deliver(); - }); + Promise.all(nmRelatedPromises).then(() => { + nm.deliver(); + }); + } // Register to search database index(note);