diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-05-12 21:36:15 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-05-12 18:36:15 -0700 |
commit | e46c1b8d52dce75a442b42c40803a071532676d7 (patch) | |
tree | c740a567ece804427d65841397746a888417adf2 /api | |
parent | 4f22cbc92bf131fe37dbed43a4154a43e344d8cf (diff) | |
download | chat-e46c1b8d52dce75a442b42c40803a071532676d7.tar.gz chat-e46c1b8d52dce75a442b42c40803a071532676d7.tar.bz2 chat-e46c1b8d52dce75a442b42c40803a071532676d7.zip |
Inlcude team Id for fake context for incoming webhooks (#2988)
Diffstat (limited to 'api')
-rw-r--r-- | api/webhook.go | 2 |
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 |