From d6897dbe2b430bbfdaeec0c9c577ad29d5ab89d2 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Wed, 1 Mar 2023 19:49:18 +0530 Subject: [PATCH] fix notify rooms --- pages/signup.go | 3 ++- utils/signup-script-template | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/signup.go b/pages/signup.go index 2e23121..462c3a7 100644 --- a/pages/signup.go +++ b/pages/signup.go @@ -56,7 +56,8 @@ func SignupPage(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusInternalServerError) } // send notification to admins - err = shoutrrr.Send(os.Getenv("PUBLAPI_NOTIFY_SHOUTRRRURL")+os.Getenv("PUBLAPI_NOTIFY_SHOUTRRRURL"), "New user signup! Please review /var/publapi/users/"+username+".sh to approve or deny the user. IP: "+ip+" Email: "+email) + shoutrrrUrl := os.Getenv("PUBLAPI_NOTIFY_SHOUTRRRURL") + os.Getenv("PUBLAPI_NOTIFY_ROOMS") + err = shoutrrr.Send(shoutrrrUrl, "New user signup! Please review /var/publapi/users/"+username+".sh to approve or deny the user. IP: "+ip+" Email: "+email) if err != nil { log.Error("Error sending notification to admins", err) return c.SendStatus(fiber.StatusInternalServerError) diff --git a/utils/signup-script-template b/utils/signup-script-template index 28f712e..89180f3 100644 --- a/utils/signup-script-template +++ b/utils/signup-script-template @@ -36,5 +36,5 @@ We hope you have enough freedom to do what you want. You are limited to 20GB of We hope you have as much fun as we did making the Pubnix! :D' \ | s-nail -vr pubnix@projectsegfau.lt -s 'Your Project Segfault Pubnix account has been created' {{email}} -source /var/publapi/publapi.env && shoutrrr send -u $PUBLAPI_NOTIFY_SHOUTRRRURL -m "Welcome new user, ~{{username}}!" +source /var/publapi/publapi.env && shoutrrr send -u $PUBLAPI_NOTIFY_SHOUTRRRURL -m "Welcome new user, {{username}}!" rm -rf $0