X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fnotifier%2Fnotifier.ts;h=a6f13780b424d5d3585e31ce11746cb7108dfa76;hb=15eb9e5b8fe9a29201567ab41f730fd39c1a14b8;hp=8b68d2e691da14544e457a3a25442da3fe34aa27;hpb=421ff4618da64f0849353383f690a014024c40da;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/notifier/notifier.ts b/server/lib/notifier/notifier.ts index 8b68d2e69..a6f13780b 100644 --- a/server/lib/notifier/notifier.ts +++ b/server/lib/notifier/notifier.ts @@ -12,6 +12,7 @@ import { AbuseStateChangeForReporter, AutoFollowForInstance, CommentMention, + StudioEditionFinishedForOwner, FollowForInstance, FollowForUser, ImportFinishedForOwner, @@ -53,7 +54,8 @@ class Notifier { abuseStateChange: [ AbuseStateChangeForReporter ], newAbuseMessage: [ NewAbuseMessageForReporter, NewAbuseMessageForModerators ], newPeertubeVersion: [ NewPeerTubeVersionForAdmins ], - newPluginVersion: [ NewPluginVersionForAdmins ] + newPluginVersion: [ NewPluginVersionForAdmins ], + videoStudioEditionFinished: [ StudioEditionFinishedForOwner ] } private static instance: Notifier @@ -198,6 +200,13 @@ class Notifier { .catch(err => logger.error('Cannot notify on new plugin version %s.', plugin.name, { err })) } + notifyOfFinishedVideoStudioEdition (video: MVideoFullLight) { + const models = this.notificationModels.videoStudioEditionFinished + + this.sendNotifications(models, video) + .catch(err => logger.error('Cannot notify on finished studio edition %s.', video.url, { err })) + } + private async notify (object: AbstractNotification) { await object.prepare()