Remove buttons

This commit is contained in:
idanoo 2022-11-20 18:59:26 +13:00
parent 78744e4701
commit 33d7f4ee7d
Signed by: idanoo
GPG Key ID: 387387CDBC02F132

View File

@ -74,7 +74,7 @@ func handler(w http.ResponseWriter, r *http.Request) {
country := ipLookup(i.Object.IP) country := ipLookup(i.Object.IP)
err = sendWebhook( err = sendWebhook(
fmt.Sprintf( fmt.Sprintf(
"[New Signup](%s) %s: *%s* (%s). %s *[APPROVE](%s)* or *[REJECT](%s)*", "[New Signup](%s) %s: *%s* (%s). %s",
fmt.Sprintf( fmt.Sprintf(
"https://mastodon.nz/admin/accounts/%s", "https://mastodon.nz/admin/accounts/%s",
i.Object.ID, i.Object.ID,
@ -86,8 +86,6 @@ func handler(w http.ResponseWriter, r *http.Request) {
"Notes: %s", "Notes: %s",
i.Object.Notes, 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 { if err != nil {
@ -121,8 +119,10 @@ func sendWebhook(msgText string) error {
client := &http.Client{} client := &http.Client{}
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {
panic(err) log.Print(err)
return nil
} }
defer resp.Body.Close() defer resp.Body.Close()
return nil return nil