mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
allow incoming webhooks even if it doesnt have a text on it if attachment field is present
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user