Skip to content

Commit

Permalink
email object -> email subject
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Aug 22, 2019
1 parent 122dbb5 commit 916937d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ smtp:
email:
body:
signature: "PeerTube"
object:
subject:
prefix: "[PeerTube]"

# From the project root directory
Expand Down
2 changes: 1 addition & 1 deletion config/production.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ smtp:
email:
body:
signature: "PeerTube"
object:
subject:
prefix: "[PeerTube]"

# From the project root directory
Expand Down
2 changes: 1 addition & 1 deletion server/initializers/checker-before-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions server/initializers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
34 changes: 17 additions & 17 deletions server/lib/emailer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 916937d

Please sign in to comment.