From d5b01763bb3dbf1dc9edf654a22a41a6f84b5f4d Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 27 Feb 2018 14:51:10 +0100 Subject: [PATCH] Added patch to add empty notification list --- .../add-user-notifications.go | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 patches/add-user-notifications/add-user-notifications.go diff --git a/patches/add-user-notifications/add-user-notifications.go b/patches/add-user-notifications/add-user-notifications.go new file mode 100644 index 00000000..93b08d14 --- /dev/null +++ b/patches/add-user-notifications/add-user-notifications.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + + "github.com/animenotifier/arn" + "github.com/fatih/color" +) + +func main() { + defer arn.Node.Close() + + for user := range arn.StreamUsers() { + obj := user.Notifications() + + if obj == nil { + fmt.Println(user.Nick) + arn.NewUserNotifications(user.ID).Save() + } + } + + color.Green("Finished.") +}