summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-16 11:38:25 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-16 11:38:25 -0500
commit48d2f86b90b3e0b02cb28f3e8b6e4d454f9cb869 (patch)
tree7ba35bc8353d5398934bb73692ec40ee47a81404 /api
parentd03b3830976c96aab59cb78177cfd0e82cc05b8d (diff)
parent49a459d696fc8fee0b508990fca571fb8d2f2654 (diff)
downloadchat-48d2f86b90b3e0b02cb28f3e8b6e4d454f9cb869.tar.gz
chat-48d2f86b90b3e0b02cb28f3e8b6e4d454f9cb869.tar.bz2
chat-48d2f86b90b3e0b02cb28f3e8b6e4d454f9cb869.zip
Merge release branch 'release-1.2'
Diffstat (limited to 'api')
-rw-r--r--api/post.go8
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{}