summaryrefslogtreecommitdiffstats
path: root/api/webhook.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-05-12 21:36:15 -0400
committerCorey Hulen <corey@hulen.com>2016-05-12 18:36:15 -0700
commite46c1b8d52dce75a442b42c40803a071532676d7 (patch)
treec740a567ece804427d65841397746a888417adf2 /api/webhook.go
parent4f22cbc92bf131fe37dbed43a4154a43e344d8cf (diff)
downloadchat-e46c1b8d52dce75a442b42c40803a071532676d7.tar.gz
chat-e46c1b8d52dce75a442b42c40803a071532676d7.tar.bz2
chat-e46c1b8d52dce75a442b42c40803a071532676d7.zip
Inlcude team Id for fake context for incoming webhooks (#2988)
Diffstat (limited to 'api/webhook.go')
-rw-r--r--api/webhook.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/webhook.go b/api/webhook.go
index a4367026f..11456d69e 100644
--- a/api/webhook.go
+++ b/api/webhook.go
@@ -434,6 +434,8 @@ func incomingWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
IsOAuth: false,
}
+ c.TeamId = hook.TeamId
+
if !c.HasPermissionsToChannel(pchan, "createIncomingHook") && channel.Type != model.CHANNEL_OPEN {
c.Err = model.NewLocAppError("incomingWebhook", "web.incoming_webhook.permissions.app_error", nil, "")
return