diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 13:52:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 14:53:42 +0200 |
commit | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch) | |
tree | 1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/lib/emailer.ts | |
parent | 96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff) | |
download | PeerTube-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.ts | 6 |
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' | |||
2 | import { isTestInstance } from '../helpers/core-utils' | 2 | import { isTestInstance } from '../helpers/core-utils' |
3 | import { bunyanLogger, logger } from '../helpers/logger' | 3 | import { bunyanLogger, logger } from '../helpers/logger' |
4 | import { CONFIG } from '../initializers/config' | 4 | import { CONFIG } from '../initializers/config' |
5 | import { UserModel } from '../models/account/user' | ||
6 | import { JobQueue } from './job-queue' | 5 | import { JobQueue } from './job-queue' |
7 | import { EmailPayload } from './job-queue/handlers/email' | 6 | import { EmailPayload } from './job-queue/handlers/email' |
8 | import { readFileSync } from 'fs-extra' | 7 | import { readFileSync } from 'fs-extra' |
9 | import { VideoBlacklistModel } from '../models/video/video-blacklist' | ||
10 | import { WEBSERVER } from '../initializers/constants' | 8 | import { WEBSERVER } from '../initializers/constants' |
11 | import { MCommentOwnerVideo, MVideo, MVideoAbuseVideo, MVideoAccountLight, MVideoBlacklistVideo } from '../typings/models/video' | 9 | import { MCommentOwnerVideo, MVideo, MVideoAbuseVideo, MVideoAccountLight, MVideoBlacklistVideo } from '../typings/models/video' |
12 | import { MActorFollowActors, MActorFollowFull, MUser } from '../typings/models' | 10 | import { MActorFollowActors, MActorFollowFollowingFullFollowerAccount, MUser } from '../typings/models' |
13 | import { MVideoImport, MVideoImportVideo } from '@server/typings/models/video/video-import' | 11 | import { MVideoImport, MVideoImportVideo } from '@server/typings/models/video/video-import' |
14 | 12 | ||
15 | type SendEmailOptions = { | 13 | type 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 | ||