fix webhooks

This commit is contained in:
Dot-Rar 2020-03-06 19:37:58 +00:00
parent 203bdd938b
commit 5b05e27bae
2 changed files with 4 additions and 4 deletions

View File

@ -178,7 +178,7 @@ func WebChatWs(ctx *gin.Context) {
success := false
if webhook != nil {
success = executeWebhook(content, ticket.Uuid, *webhook, store)
success = executeWebhook( ticket.Uuid, *webhook, content, store)
}
if !success {
@ -207,7 +207,7 @@ func executeWebhook(uuid, webhook, content string, store sessions.Session) bool
encoded, err := json.Marshal(&body); if err != nil {
return false
}
req, err := http.NewRequest("POST", fmt.Sprintf("https://discordapp.com/api/v6/webhooks/%s", webhook), bytes.NewBuffer(encoded)); if err != nil {
req, err := http.NewRequest("POST", fmt.Sprintf("https://canary.discordapp.com/api/webhooks/%s", webhook), bytes.NewBuffer(encoded)); if err != nil {
return false
}