diff options
Diffstat (limited to 'api/post.go')
-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{} |