summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/models/message.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-12-06 23:16:02 +0100
committerGitHub <noreply@github.com>2020-12-06 23:16:02 +0100
commit0d7315249d20bf9856605068074a7b6c6bcce835 (patch)
treef8ab7e0f3e96491e439eb49beebf3fae658215c4 /vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/models/message.go
parent4913766d58cd1fe204b27dc93172c5dd4a95a88a (diff)
downloadmatterbridge-msglm-0d7315249d20bf9856605068074a7b6c6bcce835.tar.gz
matterbridge-msglm-0d7315249d20bf9856605068074a7b6c6bcce835.tar.bz2
matterbridge-msglm-0d7315249d20bf9856605068074a7b6c6bcce835.zip
Update vendor (#1330)
Diffstat (limited to 'vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/models/message.go')
-rw-r--r--vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/models/message.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/models/message.go b/vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/models/message.go
index 0c5e9b01..f3dc1c6f 100644
--- a/vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/models/message.go
+++ b/vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/models/message.go
@@ -66,6 +66,9 @@ type Attachment struct {
AudioURL string `json:"audio_url,omitempty"`
VideoURL string `json:"video_url,omitempty"`
+ Actions []AttachmentAction `json:"actions,omitempty"`
+ ActionButtonsAlignment AttachmentActionButtonsAlignment `json:"button_alignment,omitempty"`
+
Fields []AttachmentField `json:"fields,omitempty"`
}
@@ -77,3 +80,37 @@ type AttachmentField struct {
Title string `json:"title"`
Value string `json:"value"`
}
+
+type AttachmentActionType string
+
+const (
+ AttachmentActionTypeButton AttachmentActionType = "button"
+)
+
+// AttachmentAction are action buttons on message attachments
+type AttachmentAction struct {
+ Type AttachmentActionType `json:"type"`
+ Text string `json:"text"`
+ Url string `json:"url"`
+ ImageURL string `json:"image_url"`
+ IsWebView bool `json:"is_webview"`
+ WebviewHeightRatio string `json:"webview_height_ratio"`
+ Msg string `json:"msg"`
+ MsgInChatWindow bool `json:"msg_in_chat_window"`
+ MsgProcessingType MessageProcessingType `json:"msg_processing_type"`
+}
+
+// AttachmentActionButtonAlignment configures how the actions buttons will be aligned
+type AttachmentActionButtonsAlignment string
+
+const (
+ ActionButtonAlignVertical AttachmentActionButtonsAlignment = "vertical"
+ ActionButtonAlignHorizontal AttachmentActionButtonsAlignment = "horizontal"
+)
+
+type MessageProcessingType string
+
+const (
+ ProcessingTypeSendMessage MessageProcessingType = "sendMessage"
+ ProcessingTypeRespondWithMessage MessageProcessingType = "respondWithMessage"
+)