mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
committed by
Corey Hulen
parent
884cf494cb
commit
f263d2b951
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user