pwr: allow jellyfin pwrs when not using email

switched if !emailEnabled { return } to if !messagesEnabled { return }.
Fixes #439.
This commit is contained in:
Harvey Tindall
2025-11-28 16:21:00 +00:00
parent 77d2ad3b6b
commit 7d947015d3
3 changed files with 5 additions and 4 deletions

View File

@@ -73,7 +73,7 @@ type PasswordReset struct {
}
func pwrMonitor(app *appContext, watcher *fsnotify.Watcher) {
if !emailEnabled {
if !messagesEnabled {
return
}
for {
@@ -94,7 +94,7 @@ func pwrMonitor(app *appContext, watcher *fsnotify.Watcher) {
app.debug.Printf(lm.FailedReading, event.Name, err)
continue
}
app.info.Printf("New password reset for user \"%s\"", pwr.Username)
app.info.Printf(lm.NewPWRForUser, pwr.Username)
if currentTime := time.Now(); pwr.Expiry.After(currentTime) {
user, err := app.jf.UserByName(pwr.Username, false)
if err != nil || user.ID == "" {