summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/nlopes/slack/block_element.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-11-14 00:04:39 +0100
committerGitHub <noreply@github.com>2019-11-14 00:04:39 +0100
commitaba86855b5f71c9809d892a7eebc6b69872fcd5b (patch)
treed9228a7b2b8e4a047b848f4d75b5a1f6b1e93cd9 /vendor/github.com/nlopes/slack/block_element.go
parented5386c213e5c41164c7dba80bb8e6fe7f6dc7d7 (diff)
downloadmatterbridge-msglm-aba86855b5f71c9809d892a7eebc6b69872fcd5b.tar.gz
matterbridge-msglm-aba86855b5f71c9809d892a7eebc6b69872fcd5b.tar.bz2
matterbridge-msglm-aba86855b5f71c9809d892a7eebc6b69872fcd5b.zip
Use own slack fork to fix #937 (#943)
Diffstat (limited to 'vendor/github.com/nlopes/slack/block_element.go')
-rw-r--r--vendor/github.com/nlopes/slack/block_element.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/github.com/nlopes/slack/block_element.go b/vendor/github.com/nlopes/slack/block_element.go
index c62ba99c..5b1b4b01 100644
--- a/vendor/github.com/nlopes/slack/block_element.go
+++ b/vendor/github.com/nlopes/slack/block_element.go
@@ -62,6 +62,20 @@ type BlockElements struct {
ElementSet []BlockElement `json:"elements,omitempty"`
}
+// UnknownBlockElement any block element that this library does not directly support.
+// See the "Rich Elements" section at the following URL:
+// https://api.slack.com/changelog/2019-09-what-they-see-is-what-you-get-and-more-and-less
+// New block element types may be introduced by Slack at any time; this is a catch-all for any such block elements.
+type UnknownBlockElement struct {
+ Type MessageElementType `json:"type"`
+ Elements BlockElements
+}
+
+// ElementType returns the type of the Element
+func (s UnknownBlockElement) ElementType() MessageElementType {
+ return s.Type
+}
+
// ImageBlockElement An element to insert an image - this element can be used
// in section and context blocks only. If you want a block with only an image
// in it, you're looking for the image block.