allow incoming webhooks even if it doesnt have a text on it if attachment field is present

This commit is contained in:
Florian Orben
2015-11-14 00:49:36 +01:00
parent cd82de18f5
commit ab99c378c4

View File

@@ -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
}