diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-11-16 08:05:29 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-11-16 08:05:29 -0500 |
commit | 7fd2bfd5b4aad0599ab0748a9f83ec1469c35db2 (patch) | |
tree | 0abe70e1dc88428cd9ef826b15e9a8d3e0ac940f /api | |
parent | 44db8439d866119238d3d103f03dc361d9bf17f0 (diff) | |
parent | 7b1e86a08cd8549f694cd7dc17aa62833f65155d (diff) | |
download | chat-7fd2bfd5b4aad0599ab0748a9f83ec1469c35db2.tar.gz chat-7fd2bfd5b4aad0599ab0748a9f83ec1469c35db2.tar.bz2 chat-7fd2bfd5b4aad0599ab0748a9f83ec1469c35db2.zip |
Merge pull request #1440 from mattermost/out-hook-fix
Fixing outgoing hook
Diffstat (limited to 'api')
-rw-r--r-- | api/post.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/api/post.go b/api/post.go index 3892d4ee8..ef70e1336 100644 --- a/api/post.go +++ b/api/post.go @@ -229,6 +229,14 @@ func handlePostEventsAndForget(c *Context, post *model.Post, triggerWebhooks boo func handleWebhookEventsAndForget(c *Context, post *model.Post, team *model.Team, channel *model.Channel, user *model.User) { go func() { + if !utils.Cfg.ServiceSettings.EnableOutgoingWebhooks { + return + } + + if channel.Type != model.CHANNEL_OPEN { + return + } + hchan := Srv.Store.Webhook().GetOutgoingByTeam(c.Session.TeamId) hooks := []*model.OutgoingWebhook{} |