Split some settings into new "messages" section

Most email dependant sections now depend on this. Also renamed more
email things.
This commit is contained in:
Harvey Tindall
2021-05-07 21:53:29 +01:00
parent 51f2f4cc6a
commit ea0293bd4e
21 changed files with 289 additions and 219 deletions
+2 -2
View File
@@ -120,7 +120,7 @@ func (app *appContext) AdminPage(gc *gin.Context) {
"cssClass": app.cssClass,
"contactMessage": "",
"email_enabled": emailEnabled,
"telegram_enabled": app.config.Section("telegram").Key("enabled").MustBool(false),
"telegram_enabled": telegramEnabled,
"notifications": notificationsEnabled,
"version": version,
"commit": commit,
@@ -283,7 +283,7 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
"userExpiryMinutes": inv.UserMinutes,
"userExpiryMessage": app.storage.lang.Form[lang].Strings.get("yourAccountIsValidUntil"),
"langName": lang,
"telegramEnabled": app.config.Section("telegram").Key("enabled").MustBool(false),
"telegramEnabled": telegramEnabled,
}
if data["telegramEnabled"].(bool) {
data["telegramPIN"] = app.telegram.NewAuthToken()