]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts
Add notification plugin hook
[github/Chocobozzz/PeerTube.git] / server / lib / notifier / shared / video-publication / abstract-owned-video-publication.ts
index 37435f898f99ce9dadc2f193e7e28cf0dfde0ec8..a940cde69ddfd497ce6234bf64628da94ea85e37 100644 (file)
@@ -27,8 +27,8 @@ export abstract class AbstractOwnedVideoPublication extends AbstractNotification
     return [ this.user ]
   }
 
-  async createNotification (user: MUserWithNotificationSetting) {
-    const notification = await UserNotificationModel.create<UserNotificationModelForApi>({
+  createNotification (user: MUserWithNotificationSetting) {
+    const notification = UserNotificationModel.build<UserNotificationModelForApi>({
       type: UserNotificationType.MY_VIDEO_PUBLISHED,
       userId: user.id,
       videoId: this.payload.id