PLT-7684 Add support to outgoing webhooks and slash commands to set post type and props (#7531)

* Add support to outgoing webhooks and slash commands to set post type and props

* Fix nil access
This commit is contained in:
Joram Wilander
2017-09-28 12:08:16 -04:00
committed by Corey Hulen
parent 884cf494cb
commit f263d2b951
8 changed files with 68 additions and 3 deletions

View File

@@ -295,6 +295,16 @@ func testCreatePostWithOutgoingHook(
}
}
resp := &model.OutgoingWebhookResponse{}
resp.Text = new(string)
*resp.Text = "some test text"
resp.Username = "testusername"
resp.IconURL = "http://www.mattermost.org/wp-content/uploads/2016/04/icon.png"
resp.Props = map[string]interface{}{"someprop": "somevalue"}
resp.Type = "custom_test"
w.Write([]byte(resp.ToJson()))
success <- true
}))
defer ts.Close()