email object -> email subject
authorChocobozzz <me@florianbigard.com>
Thu, 22 Aug 2019 08:22:01 +0000 (10:22 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 22 Aug 2019 08:22:01 +0000 (10:22 +0200)
config/default.yaml
config/production.yaml.example
server/initializers/checker-before-init.ts
server/initializers/config.ts
server/lib/emailer.ts

index b7a433b9954fd6728b45304744a13686dfda4e04..dfba23f59bb74f6f4f764371ac0a214595bcce27 100644 (file)
@@ -64,7 +64,7 @@ smtp:
 email:
   body:
     signature: "PeerTube"
-  object:
+  subject:
     prefix: "[PeerTube]"
 
 # From the project root directory
index 17a1be5025089e621d0d16c5718dfe54b06cb90b..267186e082293541d5623c0d3095fd6d9d0c072c 100644 (file)
@@ -65,7 +65,7 @@ smtp:
 email:
   body:
     signature: "PeerTube"
-  object:
+  subject:
     prefix: "[PeerTube]"
 
 # From the project root directory
index 55bc820f5e32e5c62e9b4b518e2787e5dd54648d..a986c3e0eb19a00c0f1088d31fec1e09f7551ca2 100644 (file)
@@ -11,7 +11,7 @@ function checkMissedConfig () {
     'trust_proxy',
     'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 'database.pool.max',
     'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address',
-    'email.body.signature', 'email.object.prefix',
+    'email.body.signature', 'email.subject.prefix',
     'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
     'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins',
     'log.level',
index 58241e4ea9553dce28d556a9fd10c0343e586283..510f7d64d34a2c5d24f7a5525dfe7b3c3fbc0c27 100644 (file)
@@ -48,8 +48,8 @@ const CONFIG = {
     BODY: {
       SIGNATURE: config.get<string>('email.body.signature')
     },
-    OBJECT: {
-      PREFIX: config.get<string>('email.object.prefix') + ' '
+    SUBJECT: {
+      PREFIX: config.get<string>('email.subject.prefix') + ' '
     }
   },
   STORAGE: {
index 73c2bcb1b520bb0cf022b6100ad96c0fd1c037d4..10e7d0479ca578167f11618888a306da691dd301 100644 (file)
@@ -104,7 +104,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + channelName + ' just published a new video',
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + channelName + ' just published a new video',
       text
     }
 
@@ -123,7 +123,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New follower on your channel ' + followingName,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New follower on your channel ' + followingName,
       text
     }
 
@@ -141,7 +141,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New instance follower',
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New instance follower',
       text
     }
 
@@ -161,7 +161,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video ${video.name} is published`,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Your video ${video.name} is published`,
       text
     }
 
@@ -181,7 +181,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} is finished`,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} is finished`,
       text
     }
 
@@ -201,7 +201,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} encountered an error`,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} encountered an error`,
       text
     }
 
@@ -223,7 +223,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New comment on your video ' + video.name,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New comment on your video ' + video.name,
       text
     }
 
@@ -245,7 +245,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Mention on video ' + video.name,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Mention on video ' + video.name,
       text
     }
 
@@ -262,7 +262,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Received a video abuse',
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Received a video abuse',
       text
     }
 
@@ -285,7 +285,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'An auto-blacklisted video is awaiting review',
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'An auto-blacklisted video is awaiting review',
       text
     }
 
@@ -300,7 +300,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New user registration on ' + WEBSERVER.HOST,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New user registration on ' + WEBSERVER.HOST,
       text
     }
 
@@ -322,7 +322,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Video ${videoName} blacklisted`,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Video ${videoName} blacklisted`,
       text
     }
 
@@ -340,7 +340,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to,
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Video ${video.name} unblacklisted`,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Video ${video.name} unblacklisted`,
       text
     }
 
@@ -357,7 +357,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to: [ to ],
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Reset your password',
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Reset your password',
       text
     }
 
@@ -374,7 +374,7 @@ class Emailer {
 
     const emailPayload: EmailPayload = {
       to: [ to ],
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Verify your email',
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Verify your email',
       text
     }
 
@@ -395,7 +395,7 @@ class Emailer {
     const to = user.email
     const emailPayload: EmailPayload = {
       to: [ to ],
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Account ' + blockedWord,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Account ' + blockedWord,
       text
     }
 
@@ -415,7 +415,7 @@ class Emailer {
       fromDisplayName: fromEmail,
       replyTo: fromEmail,
       to: [ CONFIG.ADMIN.EMAIL ],
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + subject,
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + subject,
       text
     }