From 2983a5a8b0f46964e73085a84a362f9d78dcb5fe Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 20 Nov 2017 16:37:39 +0100 Subject: [PATCH] Added settings patch --- .../add-user-notify-email/add-user-notify-email.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/add-user-notify-email/add-user-notify-email.go diff --git a/patches/add-user-notify-email/add-user-notify-email.go b/patches/add-user-notify-email/add-user-notify-email.go new file mode 100644 index 00000000..921eacc5 --- /dev/null +++ b/patches/add-user-notify-email/add-user-notify-email.go @@ -0,0 +1,13 @@ +package main + +import "github.com/animenotifier/arn" + +func main() { + defer arn.Node.Close() + + for user := range arn.StreamUsers() { + settings := user.Settings() + settings.NotificationEmail = user.Email + settings.Save() + } +}