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
This commit is contained in:
Christopher Speller
2015-11-15 21:39:31 -05:00

View File

@@ -989,7 +989,7 @@ func incomingWebhook(c *api.Context, w http.ResponseWriter, r *http.Request) {
} }
text := parsedRequest.Text text := parsedRequest.Text
if len(text) == 0 { if len(text) == 0 && parsedRequest.Attachments == nil {
c.Err = model.NewAppError("incomingWebhook", "No text specified", "") c.Err = model.NewAppError("incomingWebhook", "No text specified", "")
return return
} }