From ab99c378c4f707e404db97b4ef24f00236bac00e Mon Sep 17 00:00:00 2001 From: Florian Orben Date: Sat, 14 Nov 2015 00:49:36 +0100 Subject: allow incoming webhooks even if it doesnt have a text on it if attachment field is present --- web/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/web.go') 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 } -- cgit v1.2.3-1-g7c22