summaryrefslogtreecommitdiffstats
path: root/web/web.go
diff options
context:
space:
mode:
authorFlorian Orben <florian.orben@gmail.com>2015-11-14 00:49:36 +0100
committerFlorian Orben <florian.orben@gmail.com>2015-11-14 01:45:48 +0100
commitab99c378c4f707e404db97b4ef24f00236bac00e (patch)
treee001530e494716b0c8bd8c0265b798664b857d75 /web/web.go
parentcd82de18f5c47f1dcc0e6e31af9d17c1ff0b1136 (diff)
downloadchat-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/web.go')
-rw-r--r--web/web.go2
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
}