Browse Source

email object -> email subject

Chocobozzz 3 months ago
parent
commit
916937d7da
No account linked to committer's email address

+ 1
- 1
config/default.yaml View File

@@ -64,7 +64,7 @@ smtp:
64 64
 email:
65 65
   body:
66 66
     signature: "PeerTube"
67
-  object:
67
+  subject:
68 68
     prefix: "[PeerTube]"
69 69
 
70 70
 # From the project root directory

+ 1
- 1
config/production.yaml.example View File

@@ -65,7 +65,7 @@ smtp:
65 65
 email:
66 66
   body:
67 67
     signature: "PeerTube"
68
-  object:
68
+  subject:
69 69
     prefix: "[PeerTube]"
70 70
 
71 71
 # From the project root directory

+ 1
- 1
server/initializers/checker-before-init.ts View File

@@ -11,7 +11,7 @@ function checkMissedConfig () {
11 11
     'trust_proxy',
12 12
     'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 'database.pool.max',
13 13
     'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address',
14
-    'email.body.signature', 'email.object.prefix',
14
+    'email.body.signature', 'email.subject.prefix',
15 15
     'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
16 16
     'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins',
17 17
     'log.level',

+ 2
- 2
server/initializers/config.ts View File

@@ -48,8 +48,8 @@ const CONFIG = {
48 48
     BODY: {
49 49
       SIGNATURE: config.get<string>('email.body.signature')
50 50
     },
51
-    OBJECT: {
52
-      PREFIX: config.get<string>('email.object.prefix') + ' '
51
+    SUBJECT: {
52
+      PREFIX: config.get<string>('email.subject.prefix') + ' '
53 53
     }
54 54
   },
55 55
   STORAGE: {

+ 17
- 17
server/lib/emailer.ts View File

@@ -104,7 +104,7 @@ class Emailer {
104 104
 
105 105
     const emailPayload: EmailPayload = {
106 106
       to,
107
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + channelName + ' just published a new video',
107
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + channelName + ' just published a new video',
108 108
       text
109 109
     }
110 110
 
@@ -123,7 +123,7 @@ class Emailer {
123 123
 
124 124
     const emailPayload: EmailPayload = {
125 125
       to,
126
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New follower on your channel ' + followingName,
126
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New follower on your channel ' + followingName,
127 127
       text
128 128
     }
129 129
 
@@ -141,7 +141,7 @@ class Emailer {
141 141
 
142 142
     const emailPayload: EmailPayload = {
143 143
       to,
144
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New instance follower',
144
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New instance follower',
145 145
       text
146 146
     }
147 147
 
@@ -161,7 +161,7 @@ class Emailer {
161 161
 
162 162
     const emailPayload: EmailPayload = {
163 163
       to,
164
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video ${video.name} is published`,
164
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Your video ${video.name} is published`,
165 165
       text
166 166
     }
167 167
 
@@ -181,7 +181,7 @@ class Emailer {
181 181
 
182 182
     const emailPayload: EmailPayload = {
183 183
       to,
184
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} is finished`,
184
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} is finished`,
185 185
       text
186 186
     }
187 187
 
@@ -201,7 +201,7 @@ class Emailer {
201 201
 
202 202
     const emailPayload: EmailPayload = {
203 203
       to,
204
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} encountered an error`,
204
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} encountered an error`,
205 205
       text
206 206
     }
207 207
 
@@ -223,7 +223,7 @@ class Emailer {
223 223
 
224 224
     const emailPayload: EmailPayload = {
225 225
       to,
226
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New comment on your video ' + video.name,
226
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New comment on your video ' + video.name,
227 227
       text
228 228
     }
229 229
 
@@ -245,7 +245,7 @@ class Emailer {
245 245
 
246 246
     const emailPayload: EmailPayload = {
247 247
       to,
248
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Mention on video ' + video.name,
248
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Mention on video ' + video.name,
249 249
       text
250 250
     }
251 251
 
@@ -262,7 +262,7 @@ class Emailer {
262 262
 
263 263
     const emailPayload: EmailPayload = {
264 264
       to,
265
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Received a video abuse',
265
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Received a video abuse',
266 266
       text
267 267
     }
268 268
 
@@ -285,7 +285,7 @@ class Emailer {
285 285
 
286 286
     const emailPayload: EmailPayload = {
287 287
       to,
288
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'An auto-blacklisted video is awaiting review',
288
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'An auto-blacklisted video is awaiting review',
289 289
       text
290 290
     }
291 291
 
@@ -300,7 +300,7 @@ class Emailer {
300 300
 
301 301
     const emailPayload: EmailPayload = {
302 302
       to,
303
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New user registration on ' + WEBSERVER.HOST,
303
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'New user registration on ' + WEBSERVER.HOST,
304 304
       text
305 305
     }
306 306
 
@@ -322,7 +322,7 @@ class Emailer {
322 322
 
323 323
     const emailPayload: EmailPayload = {
324 324
       to,
325
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Video ${videoName} blacklisted`,
325
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Video ${videoName} blacklisted`,
326 326
       text
327 327
     }
328 328
 
@@ -340,7 +340,7 @@ class Emailer {
340 340
 
341 341
     const emailPayload: EmailPayload = {
342 342
       to,
343
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + `Video ${video.name} unblacklisted`,
343
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + `Video ${video.name} unblacklisted`,
344 344
       text
345 345
     }
346 346
 
@@ -357,7 +357,7 @@ class Emailer {
357 357
 
358 358
     const emailPayload: EmailPayload = {
359 359
       to: [ to ],
360
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Reset your password',
360
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Reset your password',
361 361
       text
362 362
     }
363 363
 
@@ -374,7 +374,7 @@ class Emailer {
374 374
 
375 375
     const emailPayload: EmailPayload = {
376 376
       to: [ to ],
377
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Verify your email',
377
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Verify your email',
378 378
       text
379 379
     }
380 380
 
@@ -395,7 +395,7 @@ class Emailer {
395 395
     const to = user.email
396 396
     const emailPayload: EmailPayload = {
397 397
       to: [ to ],
398
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Account ' + blockedWord,
398
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Account ' + blockedWord,
399 399
       text
400 400
     }
401 401
 
@@ -415,7 +415,7 @@ class Emailer {
415 415
       fromDisplayName: fromEmail,
416 416
       replyTo: fromEmail,
417 417
       to: [ CONFIG.ADMIN.EMAIL ],
418
-      subject: CONFIG.EMAIL.OBJECT.PREFIX + subject,
418
+      subject: CONFIG.EMAIL.SUBJECT.PREFIX + subject,
419 419
       text
420 420
     }
421 421
 

Loading…
Cancel
Save