aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user/setting
diff options
context:
space:
mode:
authorTyrone Yeh <siryeh@gmail.com>2022-07-28 16:30:12 +0800
committerGitHub <noreply@github.com>2022-07-28 16:30:12 +0800
commit3bd8f50af819b8dfc86b9fecdfc36ca7774c6a2d (patch)
treeffa9a1e950cb96602e7057d73e9b2dc795357ac9 /routers/web/user/setting
parent86e5268c396bd89716b2617a4949837982c1b0c3 (diff)
downloadgitea-3bd8f50af819b8dfc86b9fecdfc36ca7774c6a2d.tar.gz
gitea-3bd8f50af819b8dfc86b9fecdfc36ca7774c6a2d.zip
Added email notification option to receive all own messages (#20179)
Sometimes users want to receive email notifications of messages they create or reply to, Added an option to personal preferences to allow users to choose Closes #20149
Diffstat (limited to 'routers/web/user/setting')
-rw-r--r--routers/web/user/setting/account.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/user/setting/account.go b/routers/web/user/setting/account.go
index cdb24c6066..8b95caf2fc 100644
--- a/routers/web/user/setting/account.go
+++ b/routers/web/user/setting/account.go
@@ -156,7 +156,8 @@ func EmailPost(ctx *context.Context) {
preference := ctx.FormString("preference")
if !(preference == user_model.EmailNotificationsEnabled ||
preference == user_model.EmailNotificationsOnMention ||
- preference == user_model.EmailNotificationsDisabled) {
+ preference == user_model.EmailNotificationsDisabled ||
+ preference == user_model.EmailNotificationsAndYourOwn) {
log.Error("Email notifications preference change returned unrecognized option %s: %s", preference, ctx.Doer.Name)
ctx.ServerError("SetEmailPreference", errors.New("option unrecognized"))
return