accounts: notify users of expiry adjustment

"Send notification message" in the extend expiry dialog will send a
message to the user with their new expiry. For #345.
This commit is contained in:
Harvey Tindall
2024-07-28 16:53:27 +01:00
parent cd98e51ea9
commit 48a2058e81
7 changed files with 53 additions and 27 deletions

View File

@@ -187,9 +187,9 @@ func (app *appContext) GetCustomMessageTemplate(gc *gin.Context) {
values = app.email.deletedValues(app.storage.lang.Email[lang].Strings.get("reason"), app, false)
case "UserExpiryAdjusted":
if noContent {
msg, err = app.email.constructExpiryAdjusted(time.Time{}, "", app, true)
msg, err = app.email.constructExpiryAdjusted("", time.Time{}, "", app, true)
}
values = app.email.expiryAdjustedValues(time.Now(), app.storage.lang.Email[lang].Strings.get("reason"), app, false, true)
values = app.email.expiryAdjustedValues(username, time.Now(), app.storage.lang.Email[lang].Strings.get("reason"), app, false, true)
case "InviteEmail":
if noContent {
msg, err = app.email.constructInvite("", Invite{}, app, true)