4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-09-10 21:12:30 +00:00
Files
.github
bridge
contrib
docker
gateway
hook
img
internal
matterclient
matterhook
vendor
github.com
42wim
Baozisoftware
Jeffail
Philipp15b
Rhymen
blang
d5
davecgh
dgrijalva
disintegration
dyatlov
francoispqt
fsnotify
go-asn1-ber
go-telegram-bot-api
golang
gomarkdown
google
gopackage
gorilla
hashicorp
jpillora
keybase
labstack
lrstanley
magiconair
matrix-org
matterbridge
mattermost
mattn
mgutz
missdeer
mitchellh
monaco-io
mreiferson
mrexodia
nelsonken
paulrosania
pborman
pelletier
philhofer
pkg
pmezard
rickb777
rs
russross
saintfish
shazow
sirupsen
skip2
slack-go
slack
internal
slackutilsx
.gitignore
.golangci.yml
.gometalinter.json
CHANGELOG.md
LICENSE
Makefile
README.md
TODO.txt
admin.go
apps.go
attachments.go
auth.go
backoff.go
block.go
block_action.go
block_context.go
block_conv.go
block_divider.go
block_element.go
block_file.go
block_header.go
block_image.go
block_input.go
block_object.go
block_section.go
block_unknown.go
bots.go
channels.go
chat.go
comment.go
conversation.go
dialog.go
dialog_select.go
dialog_text.go
dnd.go
emoji.go
errors.go
files.go
go.mod
go.sum
groups.go
history.go
im.go
info.go
interactions.go
item.go
logger.go
logo.png
messageID.go
messages.go
misc.go
oauth.go
pagination.go
pins.go
reactions.go
reminders.go
rtm.go
search.go
security.go
slack.go
slash.go
stars.go
team.go
usergroups.go
users.go
views.go
webhooks.go
webhooks_go112.go
webhooks_go113.go
websocket.go
websocket_channels.go
websocket_desktop_notification.go
websocket_dm.go
websocket_dnd.go
websocket_files.go
websocket_groups.go
websocket_internals.go
websocket_managed_conn.go
websocket_misc.go
websocket_mobile_in_app_notification.go
websocket_pins.go
websocket_reactions.go
websocket_stars.go
websocket_subteam.go
websocket_teams.go
spf13
stretchr
subosito
technoweenie
tinylib
valyala
vincent-petithory
wiggin77
writeas
yaegashi
zfjagann
go.uber.org
golang.org
gomod.garykim.dev
google.golang.org
gopkg.in
layeh.com
modules.txt
.dockerignore
.fixmie.yml
.gitignore
.golangci.yaml
.goreleaser.yml
Dockerfile
LICENSE
README.md
changelog.md
go.mod
go.sum
matterbridge.go
matterbridge.toml.sample
matterbridge.toml.simple
tgs.Dockerfile
matterbridge/vendor/github.com/slack-go/slack/block_context.go
2020-03-01 20:59:19 +01:00

33 lines
894 B
Go

package slack
// ContextBlock defines data that is used to display message context, which can
// include both images and text.
//
// More Information: https://api.slack.com/reference/messaging/blocks#actions
type ContextBlock struct {
Type MessageBlockType `json:"type"`
BlockID string `json:"block_id,omitempty"`
ContextElements ContextElements `json:"elements"`
}
// BlockType returns the type of the block
func (s ContextBlock) BlockType() MessageBlockType {
return s.Type
}
type ContextElements struct {
Elements []MixedElement
}
// NewContextBlock returns a new instance of a context block
func NewContextBlock(blockID string, mixedElements ...MixedElement) *ContextBlock {
elements := ContextElements{
Elements: mixedElements,
}
return &ContextBlock{
Type: MBTContext,
BlockID: blockID,
ContextElements: elements,
}
}