]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/notifier/shared/abuse/new-abuse-for-moderators.ts
Add notification plugin hook
[github/Chocobozzz/PeerTube.git] / server / lib / notifier / shared / abuse / new-abuse-for-moderators.ts
index c3c7c5515691ff203ca5744aa1da309ffd55b053..7d86fb55f5caacc9debf8f7658e8e925165760c7 100644 (file)
@@ -28,8 +28,8 @@ export class NewAbuseForModerators extends AbstractNotification <NewAbusePayload
     return this.moderators
   }
 
-  async createNotification (user: MUserWithNotificationSetting) {
-    const notification = await UserNotificationModel.create<UserNotificationModelForApi>({
+  createNotification (user: MUserWithNotificationSetting) {
+    const notification = UserNotificationModel.build<UserNotificationModelForApi>({
       type: UserNotificationType.NEW_ABUSE_FOR_MODERATORS,
       userId: user.id,
       abuseId: this.payload.abuseInstance.id