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
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
884cf494cb
Коммит
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()
|
||||
|
||||
Ссылка в новой задаче
Block a user