X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fnotifier%2Fshared%2Fvideo-publication%2Fabstract-owned-video-publication.ts;h=a940cde69ddfd497ce6234bf64628da94ea85e37;hb=785f1897a42984ece9c6f65829d195d67e331d95;hp=37435f898f99ce9dadc2f193e7e28cf0dfde0ec8;hpb=0260dc8aca952f9412a8620e433b9e16e675696e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts b/server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts index 37435f898..a940cde69 100644 --- a/server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts +++ b/server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts @@ -27,8 +27,8 @@ export abstract class AbstractOwnedVideoPublication extends AbstractNotification return [ this.user ] } - async createNotification (user: MUserWithNotificationSetting) { - const notification = await UserNotificationModel.create({ + createNotification (user: MUserWithNotificationSetting) { + const notification = UserNotificationModel.build({ type: UserNotificationType.MY_VIDEO_PUBLISHED, userId: user.id, videoId: this.payload.id