diff --git a/jobs/test/test.go b/jobs/test/test.go index ace5bfac..a5d1ac73 100644 --- a/jobs/test/test.go +++ b/jobs/test/test.go @@ -55,7 +55,7 @@ func testPackage(pkg string) { // Send notification to the admin admin, _ := arn.GetUser("4J6qpK1ve") - admin.SendNotification(&arn.Notification{ + admin.SendNotification(&arn.PushNotification{ Title: pkg, Message: "Test failed", Link: "https://" + pkg, diff --git a/pages/notifications/notifications.go b/pages/notifications/notifications.go index 8bf4a4ac..82d57e96 100644 --- a/pages/notifications/notifications.go +++ b/pages/notifications/notifications.go @@ -16,13 +16,11 @@ func Test(ctx *aero.Context) string { return ctx.Error(http.StatusBadRequest, "Not logged in", nil) } - notification := &arn.Notification{ + user.SendNotification(&arn.PushNotification{ Title: "Anime Notifier", Message: "Yay, it works!", Icon: "https://" + ctx.App.Config.Domain + "/images/brand/220.png", - } - - user.SendNotification(notification) + }) return "ok" } diff --git a/pages/paypal/success.go b/pages/paypal/success.go index a7d7e642..290f9821 100644 --- a/pages/paypal/success.go +++ b/pages/paypal/success.go @@ -85,7 +85,7 @@ func Success(ctx *aero.Context) string { // Notify admin go func() { admin, _ := arn.GetUser(adminID) - admin.SendNotification(&arn.Notification{ + admin.SendNotification(&arn.PushNotification{ Title: user.Nick + " bought " + strconv.Itoa(payment.Gems()) + " gems", Message: user.Nick + " paid " + payment.Amount + " " + payment.Currency + " making his new balance " + strconv.Itoa(user.Balance), Icon: user.LargeAvatar(), diff --git a/sw/service-worker.ts b/sw/service-worker.ts index cbe11e6a..8d54e2ed 100644 --- a/sw/service-worker.ts +++ b/sw/service-worker.ts @@ -200,9 +200,8 @@ class MyServiceWorker { return self.registration.showNotification(payload.title, { body: payload.message, icon: payload.icon, - image: payload.image, data: payload.link, - badge: "https://notify.moe/brand/64.png" + badge: "https://media.notify.moe/images/brand/64.png" }) }