aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts4
-rw-r--r--client/src/app/shared/video-playlist/video-add-to-playlist.component.ts26
-rw-r--r--client/src/app/shared/video/video-actions-dropdown.component.ts5
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.scss1
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts38
-rw-r--r--config/default.yaml6
-rw-r--r--server/helpers/custom-validators/activitypub/activity.ts25
-rw-r--r--server/initializers/config.ts8
-rw-r--r--server/lib/emailer.ts66
9 files changed, 112 insertions, 67 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts
index 25d51d2cb..03f34412c 100644
--- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts
+++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts
@@ -67,7 +67,9 @@ export class MyAccountVideoPlaylistElementsComponent implements OnInit, OnDestro
67 if (previousIndex === newIndex) return 67 if (previousIndex === newIndex) return
68 68
69 const oldPosition = this.videos[previousIndex].playlistElement.position 69 const oldPosition = this.videos[previousIndex].playlistElement.position
70 const insertAfter = newIndex === 0 ? 0 : this.videos[newIndex].playlistElement.position 70 let insertAfter = this.videos[newIndex].playlistElement.position
71
72 if (oldPosition > insertAfter) insertAfter--
71 73
72 this.videoPlaylistService.reorderPlaylist(this.playlist.id, oldPosition, insertAfter) 74 this.videoPlaylistService.reorderPlaylist(this.playlist.id, oldPosition, insertAfter)
73 .subscribe( 75 .subscribe(
diff --git a/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts
index 7dcdf7a9e..be15f2352 100644
--- a/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts
+++ b/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts
@@ -1,4 +1,4 @@
1import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core' 1import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'
2import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' 2import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
3import { AuthService, Notifier } from '@app/core' 3import { AuthService, Notifier } from '@app/core'
4import { forkJoin } from 'rxjs' 4import { forkJoin } from 'rxjs'
@@ -22,7 +22,7 @@ type PlaylistSummary = {
22 templateUrl: './video-add-to-playlist.component.html', 22 templateUrl: './video-add-to-playlist.component.html',
23 changeDetection: ChangeDetectionStrategy.OnPush 23 changeDetection: ChangeDetectionStrategy.OnPush
24}) 24})
25export class VideoAddToPlaylistComponent extends FormReactive implements OnInit { 25export class VideoAddToPlaylistComponent extends FormReactive implements OnInit, OnChanges {
26 @Input() video: Video 26 @Input() video: Video
27 @Input() currentVideoTimestamp: number 27 @Input() currentVideoTimestamp: number
28 @Input() lazyLoad = false 28 @Input() lazyLoad = false
@@ -54,15 +54,33 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit
54 } 54 }
55 55
56 ngOnInit () { 56 ngOnInit () {
57 this.resetOptions(true)
58
59 this.buildForm({ 57 this.buildForm({
60 displayName: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME 58 displayName: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME
61 }) 59 })
62 60
61 this.init()
62 }
63
64 ngOnChanges (simpleChanges: SimpleChanges) {
65 if (simpleChanges['video']) {
66 this.unload()
67 }
68 }
69
70 init () {
71 this.resetOptions(true)
72
63 if (this.lazyLoad !== true) this.load() 73 if (this.lazyLoad !== true) this.load()
64 } 74 }
65 75
76 unload () {
77 this.videoPlaylists = []
78
79 this.init()
80
81 this.cd.markForCheck()
82 }
83
66 load () { 84 load () {
67 forkJoin([ 85 forkJoin([
68 this.videoPlaylistService.listAccountPlaylists(this.user.account, '-updatedAt'), 86 this.videoPlaylistService.listAccountPlaylists(this.user.account, '-updatedAt'),
diff --git a/client/src/app/shared/video/video-actions-dropdown.component.ts b/client/src/app/shared/video/video-actions-dropdown.component.ts
index ee2f44f9e..df799499e 100644
--- a/client/src/app/shared/video/video-actions-dropdown.component.ts
+++ b/client/src/app/shared/video/video-actions-dropdown.component.ts
@@ -79,6 +79,11 @@ export class VideoActionsDropdownComponent implements OnChanges {
79 } 79 }
80 80
81 ngOnChanges () { 81 ngOnChanges () {
82 if (this.loaded) {
83 this.loaded = false
84 this.playlistAdd.unload()
85 }
86
82 this.buildActions() 87 this.buildActions()
83 } 88 }
84 89
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss
index 8ca5c4118..bada9bae8 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.scss
+++ b/client/src/app/videos/+video-watch/video-watch.component.scss
@@ -18,6 +18,7 @@ $player-factor: 1.7; // 16/9
18 width: 100% !important; 18 width: 100% !important;
19 height: auto !important; 19 height: auto !important;
20 max-height: 300px !important; 20 max-height: 300px !important;
21 max-width: initial;
21 border-bottom: 1px solid $separator-border-color !important; 22 border-bottom: 1px solid $separator-border-color !important;
22} 23}
23 24
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts
index d8ba4df89..55109dc32 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -119,23 +119,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
119 if (videoId) this.loadVideo(videoId) 119 if (videoId) this.loadVideo(videoId)
120 }) 120 })
121 121
122 this.hotkeys = [ 122 this.initHotkeys()
123 new Hotkey('shift+l', (event: KeyboardEvent): boolean => {
124 this.setLike()
125 return false
126 }, undefined, this.i18n('Like the video')),
127 new Hotkey('shift+d', (event: KeyboardEvent): boolean => {
128 this.setDislike()
129 return false
130 }, undefined, this.i18n('Dislike the video')),
131 new Hotkey('shift+s', (event: KeyboardEvent): boolean => {
132 this.subscribeButton.subscribed ?
133 this.subscribeButton.unsubscribe() :
134 this.subscribeButton.subscribe()
135 return false
136 }, undefined, this.i18n('Subscribe to the account'))
137 ]
138 if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys)
139 } 123 }
140 124
141 ngOnDestroy () { 125 ngOnDestroy () {
@@ -569,4 +553,24 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
569 } 553 }
570 } 554 }
571 } 555 }
556
557 private initHotkeys () {
558 this.hotkeys = [
559 new Hotkey('shift+l', (event: KeyboardEvent): boolean => {
560 this.setLike()
561 return false
562 }, undefined, this.i18n('Like the video')),
563 new Hotkey('shift+d', (event: KeyboardEvent): boolean => {
564 this.setDislike()
565 return false
566 }, undefined, this.i18n('Dislike the video')),
567 new Hotkey('shift+s', (event: KeyboardEvent): boolean => {
568 this.subscribeButton.subscribed ?
569 this.subscribeButton.unsubscribe() :
570 this.subscribeButton.subscribe()
571 return false
572 }, undefined, this.i18n('Subscribe to the account'))
573 ]
574 if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys)
575 }
572} 576}
diff --git a/config/default.yaml b/config/default.yaml
index 9c9fd93dd..fcbbf17e8 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -53,6 +53,12 @@ smtp:
53 ca_file: null # Used for self signed certificates 53 ca_file: null # Used for self signed certificates
54 from_address: 'admin@example.com' 54 from_address: 'admin@example.com'
55 55
56email:
57 body:
58 signature: "PeerTube"
59 object:
60 prefix: "[PeerTube]"
61
56# From the project root directory 62# From the project root directory
57storage: 63storage:
58 tmp: 'storage/tmp/' # Used to download data (imports etc), store uploaded files before processing... 64 tmp: 'storage/tmp/' # Used to download data (imports etc), store uploaded files before processing...
diff --git a/server/helpers/custom-validators/activitypub/activity.ts b/server/helpers/custom-validators/activitypub/activity.ts
index e0d170d9d..f68c76cdc 100644
--- a/server/helpers/custom-validators/activitypub/activity.ts
+++ b/server/helpers/custom-validators/activitypub/activity.ts
@@ -12,18 +12,19 @@ import { isFlagActivityValid } from './flag'
12import { isPlaylistObjectValid } from './playlist' 12import { isPlaylistObjectValid } from './playlist'
13 13
14function isRootActivityValid (activity: any) { 14function isRootActivityValid (activity: any) {
15 return Array.isArray(activity['@context']) && ( 15 return isCollection(activity) || isActivity(activity)
16 ( 16}
17 (activity.type === 'Collection' || activity.type === 'OrderedCollection') && 17
18 validator.isInt(activity.totalItems, { min: 0 }) && 18function isCollection (activity: any) {
19 Array.isArray(activity.items) 19 return (activity.type === 'Collection' || activity.type === 'OrderedCollection') &&
20 ) || 20 validator.isInt(activity.totalItems, { min: 0 }) &&
21 ( 21 Array.isArray(activity.items)
22 isActivityPubUrlValid(activity.id) && 22}
23 exists(activity.actor) && 23
24 (isActivityPubUrlValid(activity.actor) || isActivityPubUrlValid(activity.actor.id)) 24function isActivity (activity: any) {
25 ) 25 return isActivityPubUrlValid(activity.id) &&
26 ) 26 exists(activity.actor) &&
27 (isActivityPubUrlValid(activity.actor) || isActivityPubUrlValid(activity.actor.id))
27} 28}
28 29
29const activityCheckers: { [ P in ActivityType ]: (activity: Activity) => boolean } = { 30const activityCheckers: { [ P in ActivityType ]: (activity: Activity) => boolean } = {
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 4515bc804..2be300a57 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -44,6 +44,14 @@ const CONFIG = {
44 CA_FILE: config.get<string>('smtp.ca_file'), 44 CA_FILE: config.get<string>('smtp.ca_file'),
45 FROM_ADDRESS: config.get<string>('smtp.from_address') 45 FROM_ADDRESS: config.get<string>('smtp.from_address')
46 }, 46 },
47 EMAIL: {
48 BODY: {
49 SIGNATURE: config.get<string>('email.body.signature')
50 },
51 OBJECT: {
52 PREFIX: config.get<string>('email.object.prefix') + ' '
53 }
54 },
47 STORAGE: { 55 STORAGE: {
48 TMP_DIR: buildPath(config.get<string>('storage.tmp')), 56 TMP_DIR: buildPath(config.get<string>('storage.tmp')),
49 AVATARS_DIR: buildPath(config.get<string>('storage.avatars')), 57 AVATARS_DIR: buildPath(config.get<string>('storage.avatars')),
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index 8c06e9751..c4a5a5853 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -100,11 +100,11 @@ class Emailer {
100 `You can view it on ${videoUrl} ` + 100 `You can view it on ${videoUrl} ` +
101 `\n\n` + 101 `\n\n` +
102 `Cheers,\n` + 102 `Cheers,\n` +
103 `PeerTube.` 103 `${CONFIG.EMAIL.BODY.SIGNATURE}`
104 104
105 const emailPayload: EmailPayload = { 105 const emailPayload: EmailPayload = {
106 to, 106 to,
107 subject: channelName + ' just published a new video', 107 subject: CONFIG.EMAIL.OBJECT.PREFIX + channelName + ' just published a new video',
108 text 108 text
109 } 109 }
110 110
@@ -119,11 +119,11 @@ class Emailer {
119 `Your ${followType} ${followingName} has a new subscriber: ${followerName}` + 119 `Your ${followType} ${followingName} has a new subscriber: ${followerName}` +
120 `\n\n` + 120 `\n\n` +
121 `Cheers,\n` + 121 `Cheers,\n` +
122 `PeerTube.` 122 `${CONFIG.EMAIL.BODY.SIGNATURE}`
123 123
124 const emailPayload: EmailPayload = { 124 const emailPayload: EmailPayload = {
125 to, 125 to,
126 subject: 'New follower on your channel ' + followingName, 126 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New follower on your channel ' + followingName,
127 text 127 text
128 } 128 }
129 129
@@ -137,11 +137,11 @@ class Emailer {
137 `Your instance has a new follower: ${actorFollow.ActorFollower.url}${awaitingApproval}` + 137 `Your instance has a new follower: ${actorFollow.ActorFollower.url}${awaitingApproval}` +
138 `\n\n` + 138 `\n\n` +
139 `Cheers,\n` + 139 `Cheers,\n` +
140 `PeerTube.` 140 `${CONFIG.EMAIL.BODY.SIGNATURE}`
141 141
142 const emailPayload: EmailPayload = { 142 const emailPayload: EmailPayload = {
143 to, 143 to,
144 subject: 'New instance follower', 144 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New instance follower',
145 text 145 text
146 } 146 }
147 147
@@ -157,11 +157,11 @@ class Emailer {
157 `You can view it on ${videoUrl} ` + 157 `You can view it on ${videoUrl} ` +
158 `\n\n` + 158 `\n\n` +
159 `Cheers,\n` + 159 `Cheers,\n` +
160 `PeerTube.` 160 `${CONFIG.EMAIL.BODY.SIGNATURE}`
161 161
162 const emailPayload: EmailPayload = { 162 const emailPayload: EmailPayload = {
163 to, 163 to,
164 subject: `Your video ${video.name} is published`, 164 subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video ${video.name} is published`,
165 text 165 text
166 } 166 }
167 167
@@ -177,11 +177,11 @@ class Emailer {
177 `You can view the imported video on ${videoUrl} ` + 177 `You can view the imported video on ${videoUrl} ` +
178 `\n\n` + 178 `\n\n` +
179 `Cheers,\n` + 179 `Cheers,\n` +
180 `PeerTube.` 180 `${CONFIG.EMAIL.BODY.SIGNATURE}`
181 181
182 const emailPayload: EmailPayload = { 182 const emailPayload: EmailPayload = {
183 to, 183 to,
184 subject: `Your video import ${videoImport.getTargetIdentifier()} is finished`, 184 subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} is finished`,
185 text 185 text
186 } 186 }
187 187
@@ -197,11 +197,11 @@ class Emailer {
197 `See your videos import dashboard for more information: ${importUrl}` + 197 `See your videos import dashboard for more information: ${importUrl}` +
198 `\n\n` + 198 `\n\n` +
199 `Cheers,\n` + 199 `Cheers,\n` +
200 `PeerTube.` 200 `${CONFIG.EMAIL.BODY.SIGNATURE}`
201 201
202 const emailPayload: EmailPayload = { 202 const emailPayload: EmailPayload = {
203 to, 203 to,
204 subject: `Your video import ${videoImport.getTargetIdentifier()} encountered an error`, 204 subject: CONFIG.EMAIL.OBJECT.PREFIX + `Your video import ${videoImport.getTargetIdentifier()} encountered an error`,
205 text 205 text
206 } 206 }
207 207
@@ -219,11 +219,11 @@ class Emailer {
219 `You can view it on ${commentUrl} ` + 219 `You can view it on ${commentUrl} ` +
220 `\n\n` + 220 `\n\n` +
221 `Cheers,\n` + 221 `Cheers,\n` +
222 `PeerTube.` 222 `${CONFIG.EMAIL.BODY.SIGNATURE}`
223 223
224 const emailPayload: EmailPayload = { 224 const emailPayload: EmailPayload = {
225 to, 225 to,
226 subject: 'New comment on your video ' + video.name, 226 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New comment on your video ' + video.name,
227 text 227 text
228 } 228 }
229 229
@@ -241,11 +241,11 @@ class Emailer {
241 `You can view the comment on ${commentUrl} ` + 241 `You can view the comment on ${commentUrl} ` +
242 `\n\n` + 242 `\n\n` +
243 `Cheers,\n` + 243 `Cheers,\n` +
244 `PeerTube.` 244 `${CONFIG.EMAIL.BODY.SIGNATURE}`
245 245
246 const emailPayload: EmailPayload = { 246 const emailPayload: EmailPayload = {
247 to, 247 to,
248 subject: 'Mention on video ' + video.name, 248 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Mention on video ' + video.name,
249 text 249 text
250 } 250 }
251 251
@@ -258,11 +258,11 @@ class Emailer {
258 const text = `Hi,\n\n` + 258 const text = `Hi,\n\n` +
259 `${WEBSERVER.HOST} received an abuse for the following video ${videoUrl}\n\n` + 259 `${WEBSERVER.HOST} received an abuse for the following video ${videoUrl}\n\n` +
260 `Cheers,\n` + 260 `Cheers,\n` +
261 `PeerTube.` 261 `${CONFIG.EMAIL.BODY.SIGNATURE}`
262 262
263 const emailPayload: EmailPayload = { 263 const emailPayload: EmailPayload = {
264 to, 264 to,
265 subject: '[PeerTube] Received a video abuse', 265 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Received a video abuse',
266 text 266 text
267 } 267 }
268 268
@@ -281,11 +281,11 @@ class Emailer {
281 `A full list of auto-blacklisted videos can be reviewed here: ${VIDEO_AUTO_BLACKLIST_URL}` + 281 `A full list of auto-blacklisted videos can be reviewed here: ${VIDEO_AUTO_BLACKLIST_URL}` +
282 `\n\n` + 282 `\n\n` +
283 `Cheers,\n` + 283 `Cheers,\n` +
284 `PeerTube.` 284 `${CONFIG.EMAIL.BODY.SIGNATURE}`
285 285
286 const emailPayload: EmailPayload = { 286 const emailPayload: EmailPayload = {
287 to, 287 to,
288 subject: '[PeerTube] An auto-blacklisted video is awaiting review', 288 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'An auto-blacklisted video is awaiting review',
289 text 289 text
290 } 290 }
291 291
@@ -296,11 +296,11 @@ class Emailer {
296 const text = `Hi,\n\n` + 296 const text = `Hi,\n\n` +
297 `User ${user.username} just registered on ${WEBSERVER.HOST} PeerTube instance.\n\n` + 297 `User ${user.username} just registered on ${WEBSERVER.HOST} PeerTube instance.\n\n` +
298 `Cheers,\n` + 298 `Cheers,\n` +
299 `PeerTube.` 299 `${CONFIG.EMAIL.BODY.SIGNATURE}`
300 300
301 const emailPayload: EmailPayload = { 301 const emailPayload: EmailPayload = {
302 to, 302 to,
303 subject: '[PeerTube] New user registration on ' + WEBSERVER.HOST, 303 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'New user registration on ' + WEBSERVER.HOST,
304 text 304 text
305 } 305 }
306 306
@@ -318,11 +318,11 @@ class Emailer {
318 blockedString + 318 blockedString +
319 '\n\n' + 319 '\n\n' +
320 'Cheers,\n' + 320 'Cheers,\n' +
321 `PeerTube.` 321 `${CONFIG.EMAIL.BODY.SIGNATURE}`
322 322
323 const emailPayload: EmailPayload = { 323 const emailPayload: EmailPayload = {
324 to, 324 to,
325 subject: `[PeerTube] Video ${videoName} blacklisted`, 325 subject: CONFIG.EMAIL.OBJECT.PREFIX + `Video ${videoName} blacklisted`,
326 text 326 text
327 } 327 }
328 328
@@ -336,11 +336,11 @@ class Emailer {
336 `Your video ${video.name} (${videoUrl}) on ${WEBSERVER.HOST} has been unblacklisted.` + 336 `Your video ${video.name} (${videoUrl}) on ${WEBSERVER.HOST} has been unblacklisted.` +
337 '\n\n' + 337 '\n\n' +
338 'Cheers,\n' + 338 'Cheers,\n' +
339 `PeerTube.` 339 `${CONFIG.EMAIL.BODY.SIGNATURE}`
340 340
341 const emailPayload: EmailPayload = { 341 const emailPayload: EmailPayload = {
342 to, 342 to,
343 subject: `[PeerTube] Video ${video.name} unblacklisted`, 343 subject: CONFIG.EMAIL.OBJECT.PREFIX + `Video ${video.name} unblacklisted`,
344 text 344 text
345 } 345 }
346 346
@@ -353,11 +353,11 @@ class Emailer {
353 `Please follow this link to reset it: ${resetPasswordUrl}\n\n` + 353 `Please follow this link to reset it: ${resetPasswordUrl}\n\n` +
354 `If you are not the person who initiated this request, please ignore this email.\n\n` + 354 `If you are not the person who initiated this request, please ignore this email.\n\n` +
355 `Cheers,\n` + 355 `Cheers,\n` +
356 `PeerTube.` 356 `${CONFIG.EMAIL.BODY.SIGNATURE}`
357 357
358 const emailPayload: EmailPayload = { 358 const emailPayload: EmailPayload = {
359 to: [ to ], 359 to: [ to ],
360 subject: 'Reset your PeerTube password', 360 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Reset your password',
361 text 361 text
362 } 362 }
363 363
@@ -370,11 +370,11 @@ class Emailer {
370 `Please follow this link to verify this email belongs to you: ${verifyEmailUrl}\n\n` + 370 `Please follow this link to verify this email belongs to you: ${verifyEmailUrl}\n\n` +
371 `If you are not the person who initiated this request, please ignore this email.\n\n` + 371 `If you are not the person who initiated this request, please ignore this email.\n\n` +
372 `Cheers,\n` + 372 `Cheers,\n` +
373 `PeerTube.` 373 `${CONFIG.EMAIL.BODY.SIGNATURE}`
374 374
375 const emailPayload: EmailPayload = { 375 const emailPayload: EmailPayload = {
376 to: [ to ], 376 to: [ to ],
377 subject: 'Verify your PeerTube email', 377 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Verify your email',
378 text 378 text
379 } 379 }
380 380
@@ -390,12 +390,12 @@ class Emailer {
390 blockedString + 390 blockedString +
391 '\n\n' + 391 '\n\n' +
392 'Cheers,\n' + 392 'Cheers,\n' +
393 `PeerTube.` 393 `${CONFIG.EMAIL.BODY.SIGNATURE}`
394 394
395 const to = user.email 395 const to = user.email
396 const emailPayload: EmailPayload = { 396 const emailPayload: EmailPayload = {
397 to: [ to ], 397 to: [ to ],
398 subject: '[PeerTube] Account ' + blockedWord, 398 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Account ' + blockedWord,
399 text 399 text
400 } 400 }
401 401
@@ -415,7 +415,7 @@ class Emailer {
415 fromDisplayName: fromEmail, 415 fromDisplayName: fromEmail,
416 replyTo: fromEmail, 416 replyTo: fromEmail,
417 to: [ CONFIG.ADMIN.EMAIL ], 417 to: [ CONFIG.ADMIN.EMAIL ],
418 subject: '[PeerTube] Contact form submitted', 418 subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Contact form submitted',
419 text 419 text
420 } 420 }
421 421