aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/emailer.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 13:52:49 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 14:53:42 +0200
commit0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch)
tree1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/lib/emailer.ts
parent96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff)
downloadPeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.gz
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.zst
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.zip
Cleanup model types
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r--server/lib/emailer.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index fe57a3e4c..a888b7a72 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -2,14 +2,12 @@ import { createTransport, Transporter } from 'nodemailer'
2import { isTestInstance } from '../helpers/core-utils' 2import { isTestInstance } from '../helpers/core-utils'
3import { bunyanLogger, logger } from '../helpers/logger' 3import { bunyanLogger, logger } from '../helpers/logger'
4import { CONFIG } from '../initializers/config' 4import { CONFIG } from '../initializers/config'
5import { UserModel } from '../models/account/user'
6import { JobQueue } from './job-queue' 5import { JobQueue } from './job-queue'
7import { EmailPayload } from './job-queue/handlers/email' 6import { EmailPayload } from './job-queue/handlers/email'
8import { readFileSync } from 'fs-extra' 7import { readFileSync } from 'fs-extra'
9import { VideoBlacklistModel } from '../models/video/video-blacklist'
10import { WEBSERVER } from '../initializers/constants' 8import { WEBSERVER } from '../initializers/constants'
11import { MCommentOwnerVideo, MVideo, MVideoAbuseVideo, MVideoAccountLight, MVideoBlacklistVideo } from '../typings/models/video' 9import { MCommentOwnerVideo, MVideo, MVideoAbuseVideo, MVideoAccountLight, MVideoBlacklistVideo } from '../typings/models/video'
12import { MActorFollowActors, MActorFollowFull, MUser } from '../typings/models' 10import { MActorFollowActors, MActorFollowFollowingFullFollowerAccount, MUser } from '../typings/models'
13import { MVideoImport, MVideoImportVideo } from '@server/typings/models/video/video-import' 11import { MVideoImport, MVideoImportVideo } from '@server/typings/models/video/video-import'
14 12
15type SendEmailOptions = { 13type SendEmailOptions = {
@@ -109,7 +107,7 @@ class Emailer {
109 return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload }) 107 return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
110 } 108 }
111 109
112 addNewFollowNotification (to: string[], actorFollow: MActorFollowFull, followType: 'account' | 'channel') { 110 addNewFollowNotification (to: string[], actorFollow: MActorFollowFollowingFullFollowerAccount, followType: 'account' | 'channel') {
113 const followerName = actorFollow.ActorFollower.Account.getDisplayName() 111 const followerName = actorFollow.ActorFollower.Account.getDisplayName()
114 const followingName = (actorFollow.ActorFollowing.VideoChannel || actorFollow.ActorFollowing.Account).getDisplayName() 112 const followingName = (actorFollow.ActorFollowing.VideoChannel || actorFollow.ActorFollowing.Account).getDisplayName()
115 113