summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-15 21:39:31 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-15 21:39:31 -0500
commit44db8439d866119238d3d103f03dc361d9bf17f0 (patch)
treee001530e494716b0c8bd8c0265b798664b857d75
parentcd82de18f5c47f1dcc0e6e31af9d17c1ff0b1136 (diff)
parentab99c378c4f707e404db97b4ef24f00236bac00e (diff)
downloadchat-44db8439d866119238d3d103f03dc361d9bf17f0.tar.gz
chat-44db8439d866119238d3d103f03dc361d9bf17f0.tar.bz2
chat-44db8439d866119238d3d103f03dc361d9bf17f0.zip
Merge pull request #1436 from florianorben/1432.v1.2
allow incoming webhooks even if it doesnt have a text on it if attachment field is present
-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
}