summaryrefslogtreecommitdiffstats
path: root/model/outgoing_webhook.go
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2017-11-21 00:57:35 +0100
committerChristopher Speller <crspeller@gmail.com>2017-11-20 15:57:35 -0800
commitfdba2d50fd431796e49cef00484de410b7a7a350 (patch)
treef56c63e6b5f4c194c8390d91e1425e7c78106cd3 /model/outgoing_webhook.go
parente2b165cf3ea241dd430cca8145a2dc459110666e (diff)
downloadchat-fdba2d50fd431796e49cef00484de410b7a7a350.tar.gz
chat-fdba2d50fd431796e49cef00484de410b7a7a350.tar.bz2
chat-fdba2d50fd431796e49cef00484de410b7a7a350.zip
[PLT-840] Add option to outgoing webhooks to reply to the posted message as a comment (#7807)
Diffstat (limited to 'model/outgoing_webhook.go')
-rw-r--r--model/outgoing_webhook.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/model/outgoing_webhook.go b/model/outgoing_webhook.go
index 14c6f2269..477a277de 100644
--- a/model/outgoing_webhook.go
+++ b/model/outgoing_webhook.go
@@ -46,13 +46,16 @@ type OutgoingWebhookPayload struct {
}
type OutgoingWebhookResponse struct {
- Text *string `json:"text"`
- Username string `json:"username"`
- IconURL string `json:"icon_url"`
- Props StringInterface `json:"props"`
- Type string `json:"type"`
+ Text *string `json:"text"`
+ Username string `json:"username"`
+ IconURL string `json:"icon_url"`
+ Props StringInterface `json:"props"`
+ Type string `json:"type"`
+ ResponseType string `json:"response_type"`
}
+const OUTGOING_HOOK_RESPONSE_TYPE_COMMENT = "comment"
+
func (o *OutgoingWebhookPayload) ToJSON() string {
b, err := json.Marshal(o)
if err != nil {