aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/emailer.ts
diff options
context:
space:
mode:
authorJosh Morel <morel.josh@hotmail.com>2019-04-02 05:26:47 -0400
committerChocobozzz <chocobozzz@cpy.re>2019-04-02 11:26:47 +0200
commit7ccddd7b5250bd25a917a6e77e58b87b9484a2a4 (patch)
treee75dc991369c1768804fefa114eb2a832881087f /server/lib/emailer.ts
parent12fed49ebab0c414713d57ea316b6488ae6bef99 (diff)
downloadPeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.tar.gz
PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.tar.zst
PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.zip
add quarantine videos feature (#1637)
* add quarantine videos feature * increase Notification settings test timeout to 20000ms. was completing 7000 locally but timing out after 10000 on travis * fix quarantine video test issues -propagate misspelling -remove skip from server/tests/client.ts * WIP use blacklist for moderator video approval instead of video.quarantine boolean * finish auto-blacklist feature
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r--server/lib/emailer.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index 04e4b94b6..eec97c27e 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -250,6 +250,29 @@ class Emailer {
250 return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload }) 250 return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
251 } 251 }
252 252
253 addVideoAutoBlacklistModeratorsNotification (to: string[], video: VideoModel) {
254 const VIDEO_AUTO_BLACKLIST_URL = CONFIG.WEBSERVER.URL + '/admin/moderation/video-auto-blacklist/list'
255 const videoUrl = CONFIG.WEBSERVER.URL + video.getWatchStaticPath()
256
257 const text = `Hi,\n\n` +
258 `A recently added video was auto-blacklisted and requires moderator review before publishing.` +
259 `\n\n` +
260 `You can view it and take appropriate action on ${videoUrl}` +
261 `\n\n` +
262 `A full list of auto-blacklisted videos can be reviewed here: ${VIDEO_AUTO_BLACKLIST_URL}` +
263 `\n\n` +
264 `Cheers,\n` +
265 `PeerTube.`
266
267 const emailPayload: EmailPayload = {
268 to,
269 subject: '[PeerTube] An auto-blacklisted video is awaiting review',
270 text
271 }
272
273 return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
274 }
275
253 addNewUserRegistrationNotification (to: string[], user: UserModel) { 276 addNewUserRegistrationNotification (to: string[], user: UserModel) {
254 const text = `Hi,\n\n` + 277 const text = `Hi,\n\n` +
255 `User ${user.username} just registered on ${CONFIG.WEBSERVER.HOST} PeerTube instance.\n\n` + 278 `User ${user.username} just registered on ${CONFIG.WEBSERVER.HOST} PeerTube instance.\n\n` +