summaryrefslogtreecommitdiffstats
path: root/api/webhook.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-08-22 15:19:39 -0400
committerGitHub <noreply@github.com>2016-08-22 15:19:39 -0400
commit391d685aa4d05cc4316d4770d47eed16dcfb650c (patch)
tree23d609763591a5f68eb49fa388d95c6b50c5df52 /api/webhook.go
parentecb6fd8769df164774662863258b382d42aad9eb (diff)
downloadchat-391d685aa4d05cc4316d4770d47eed16dcfb650c.tar.gz
chat-391d685aa4d05cc4316d4770d47eed16dcfb650c.tar.bz2
chat-391d685aa4d05cc4316d4770d47eed16dcfb650c.zip
Reset context error for incoming webhooks after checking permission (#3847)
Diffstat (limited to 'api/webhook.go')
-rw-r--r--api/webhook.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/webhook.go b/api/webhook.go
index ec96f012e..072a40559 100644
--- a/api/webhook.go
+++ b/api/webhook.go
@@ -480,6 +480,7 @@ func incomingWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err = model.NewLocAppError("incomingWebhook", "web.incoming_webhook.permissions.app_error", nil, "")
return
}
+ c.Err = nil
if _, err := CreateWebhookPost(hook.UserId, channel.Id, hook.TeamId, text, overrideUsername, overrideIconUrl, parsedRequest.Props, webhookType); err != nil {
c.Err = err