diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-11-14 00:49:36 +0100 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-11-14 01:45:48 +0100 |
commit | ab99c378c4f707e404db97b4ef24f00236bac00e (patch) | |
tree | e001530e494716b0c8bd8c0265b798664b857d75 /web | |
parent | cd82de18f5c47f1dcc0e6e31af9d17c1ff0b1136 (diff) | |
download | chat-ab99c378c4f707e404db97b4ef24f00236bac00e.tar.gz chat-ab99c378c4f707e404db97b4ef24f00236bac00e.tar.bz2 chat-ab99c378c4f707e404db97b4ef24f00236bac00e.zip |
allow incoming webhooks even if it doesnt have a text on it if attachment field is present
Diffstat (limited to 'web')
-rw-r--r-- | web/web.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/web.go b/web/web.go index ffc791cb7..02ceb69ba 100644 --- a/web/web.go +++ b/web/web.go @@ -989,7 +989,7 @@ func incomingWebhook(c *api.Context, w http.ResponseWriter, r *http.Request) { } text := parsedRequest.Text - if len(text) == 0 { + if len(text) == 0 && parsedRequest.Attachments == nil { c.Err = model.NewAppError("incomingWebhook", "No text specified", "") return } |