From 33d7f4ee7dbe202e216a17bdfd0c227c9da40a54 Mon Sep 17 00:00:00 2001 From: idanoo Date: Sun, 20 Nov 2022 18:59:26 +1300 Subject: [PATCH] Remove buttons --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index abb4825..91ce3ed 100644 --- a/main.go +++ b/main.go @@ -74,7 +74,7 @@ func handler(w http.ResponseWriter, r *http.Request) { country := ipLookup(i.Object.IP) err = sendWebhook( fmt.Sprintf( - "[New Signup](%s) %s: *%s* (%s). %s *[APPROVE](%s)* or *[REJECT](%s)*", + "[New Signup](%s) %s: *%s* (%s). %s", fmt.Sprintf( "https://mastodon.nz/admin/accounts/%s", i.Object.ID, @@ -86,8 +86,6 @@ func handler(w http.ResponseWriter, r *http.Request) { "Notes: %s", i.Object.Notes, ), - fmt.Sprintf("https://mastodon.nz/admin/accounts/%s/approve", i.Object.ID), - fmt.Sprintf("https://mastodon.nz/admin/accounts/%s/reject", i.Object.ID), ), ) if err != nil { @@ -121,8 +119,10 @@ func sendWebhook(msgText string) error { client := &http.Client{} resp, err := client.Do(req) if err != nil { - panic(err) + log.Print(err) + return nil } + defer resp.Body.Close() return nil