diff --git a/main.go b/main.go index 6c768ff..ab30cf7 100644 --- a/main.go +++ b/main.go @@ -74,10 +74,14 @@ func handler(w http.ResponseWriter, r *http.Request) { country := ipLookup(i.Object.IP) err = sendWebhook( fmt.Sprintf( - "*New Signup* %s (%s) has signed up.%s\n%s", + "New Signup%s: %s (%s) has signed up.\n%s\n%s", + country, i.Object.Username, i.Object.Email, - country, + fmt.Sprintf( + "Notes: %s", + i.Object.Notes, + ), fmt.Sprintf( "https://mastodon.nz/admin/accounts/%s", i.Object.ID, @@ -140,5 +144,5 @@ func ipLookup(ip string) string { return "" } - return " (" + results.Country_long + ")" + return " from" + results.Country_long } diff --git a/structs.go b/structs.go index 98dae18..59e49c3 100644 --- a/structs.go +++ b/structs.go @@ -14,6 +14,7 @@ type MastodonEvent struct { Username string `json:"username"` Email string `json:"email"` IP string `json:"ip"` + Notes string `json:"invite_request"` TargetAccount struct { ID string `json:"id"` Username string `json:"username"`