- myVideoPublishedNotification (to: string[], video: VideoModel) {
- const videoUrl = CONFIG.WEBSERVER.URL + video.getWatchStaticPath()
+ addNewInstanceFollowerNotification (to: string[], actorFollow: MActorFollowActors) {
+ const awaitingApproval = actorFollow.state === 'pending' ? ' awaiting manual approval.' : ''
+
+ const text = `Hi dear admin,\n\n` +
+ `Your instance has a new follower: ${actorFollow.ActorFollower.url}${awaitingApproval}` +
+ `\n\n` +
+ `Cheers,\n` +
+ `${CONFIG.EMAIL.BODY.SIGNATURE}`
+
+ const emailPayload: EmailPayload = {
+ to,
+ subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New instance follower',
+ text
+ }
+
+ return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
+ }
+
+ myVideoPublishedNotification (to: string[], video: MVideo) {
+ const videoUrl = WEBSERVER.URL + video.getWatchStaticPath()