[MM-9937] Add support for sending a message to a different channel than where the slash command was issued from (#9878)

* add support for channel_id in a slash command response

* add test for HandleCommandResponsePost
Этот коммит содержится в:
Michael Kochell
2018-12-12 01:43:31 -05:00
коммит произвёл Hanzei
родитель 8d7cb44f30
Коммит f94567c97b
5 изменённых файлов: 156 добавлений и 3 удалений

Просмотреть файл

@@ -21,6 +21,7 @@ type CommandResponse struct {
ResponseType string `json:"response_type"`
Text string `json:"text"`
Username string `json:"username"`
ChannelId string `json:"channel_id"`
IconURL string `json:"icon_url"`
Type string `json:"type"`
Props StringInterface `json:"props"`

Просмотреть файл

@@ -65,6 +65,7 @@ func TestCommandResponseFromJson(t *testing.T) {
"response_type": "ephemeral",
"text": "response text",
"username": "response username",
"channel_id": "response channel id",
"icon_url": "response icon url",
"goto_location": "response goto location",
"attachments": [{
@@ -87,6 +88,7 @@ func TestCommandResponseFromJson(t *testing.T) {
ResponseType: "ephemeral",
Text: "response text",
Username: "response username",
ChannelId: "response channel id",
IconURL: "response icon url",
GotoLocation: "response goto location",
Attachments: []*SlackAttachment{