]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/notifier/shared/abuse/abstract-new-abuse-message.ts
Add notification plugin hook
[github/Chocobozzz/PeerTube.git] / server / lib / notifier / shared / abuse / abstract-new-abuse-message.ts
index a7292de6952acb770f93fc64ffe0e3f80aa7da72..1dc1ccfc2359b12d487f6e661a03afe71fd14cbe 100644 (file)
@@ -21,8 +21,8 @@ export abstract class AbstractNewAbuseMessage extends AbstractNotification <NewA
     return user.NotificationSetting.abuseNewMessage
   }
 
-  async createNotification (user: MUserWithNotificationSetting) {
-    const notification = await UserNotificationModel.create<UserNotificationModelForApi>({
+  createNotification (user: MUserWithNotificationSetting) {
+    const notification = UserNotificationModel.build<UserNotificationModelForApi>({
       type: UserNotificationType.ABUSE_NEW_MESSAGE,
       userId: user.id,
       abuseId: this.abuse.id