summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/notification.go2
-rw-r--r--config/default.json1
-rw-r--r--model/config.go5
3 files changed, 8 insertions, 0 deletions
diff --git a/app/notification.go b/app/notification.go
index e647595bc..3b21e86c5 100644
--- a/app/notification.go
+++ b/app/notification.go
@@ -351,6 +351,8 @@ func (a *App) sendNotificationEmail(post *model.Post, user *model.User, channel
var subjectText string
if channel.Type == model.CHANNEL_DIRECT {
subjectText = getDirectMessageNotificationEmailSubject(post, translateFunc, a.Config().TeamSettings.SiteName, senderName)
+ } else if *a.Config().EmailSettings.UseChannelInEmailNotifications {
+ subjectText = getNotificationEmailSubject(post, translateFunc, a.Config().TeamSettings.SiteName, team.DisplayName+" ("+channel.DisplayName+")")
} else {
subjectText = getNotificationEmailSubject(post, translateFunc, a.Config().TeamSettings.SiteName, team.DisplayName)
}
diff --git a/config/default.json b/config/default.json
index eea2e7c74..0acbe9c7c 100644
--- a/config/default.json
+++ b/config/default.json
@@ -143,6 +143,7 @@
"EnableSignInWithEmail": true,
"EnableSignInWithUsername": true,
"SendEmailNotifications": true,
+ "UseChannelInEmailNotifications": false,
"RequireEmailVerification": false,
"FeedbackName": "",
"FeedbackEmail": "test@example.com",
diff --git a/model/config.go b/model/config.go
index f5e8fe27a..00322156e 100644
--- a/model/config.go
+++ b/model/config.go
@@ -653,6 +653,7 @@ type EmailSettings struct {
EnableSignInWithEmail *bool
EnableSignInWithUsername *bool
SendEmailNotifications bool
+ UseChannelInEmailNotifications *bool
RequireEmailVerification bool
FeedbackName string
FeedbackEmail string
@@ -687,6 +688,10 @@ func (s *EmailSettings) SetDefaults() {
s.EnableSignInWithUsername = NewBool(false)
}
+ if s.UseChannelInEmailNotifications == nil {
+ s.UseChannelInEmailNotifications = NewBool(false)
+ }
+
if s.SendPushNotifications == nil {
s.SendPushNotifications = NewBool(false)
}