]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/notifier/shared/video-publication/import-finished-for-owner.ts
Add notification plugin hook
[github/Chocobozzz/PeerTube.git] / server / lib / notifier / shared / video-publication / import-finished-for-owner.ts
index 9f374b6f9554979f56e52c067380fb927d158d72..3bd64692fd9e19151bc108470ac803cfa1103f67 100644 (file)
@@ -32,8 +32,8 @@ export class ImportFinishedForOwner extends AbstractNotification <ImportFinished
     return [ this.user ]
   }
 
-  async createNotification (user: MUserWithNotificationSetting) {
-    const notification = await UserNotificationModel.create<UserNotificationModelForApi>({
+  createNotification (user: MUserWithNotificationSetting) {
+    const notification = UserNotificationModel.build<UserNotificationModelForApi>({
       type: this.payload.success
         ? UserNotificationType.MY_VIDEO_IMPORT_SUCCESS
         : UserNotificationType.MY_VIDEO_IMPORT_ERROR,