summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go
diff options
context:
space:
mode:
authorWim <wim@42.be>2023-08-05 20:43:19 +0200
committerGitHub <noreply@github.com>2023-08-05 20:43:19 +0200
commit56e7bd01ca09ad52b0c4f48f146a20a4f1b78696 (patch)
treeb1355645342667209263cbd355dc0b4254f1e8fe /vendor/github.com/slack-go
parent9459495484d6e06a3d46de64fccd8d06f7ccc72c (diff)
downloadmatterbridge-msglm-master.tar.gz
matterbridge-msglm-master.tar.bz2
matterbridge-msglm-master.zip
Update dependencies and remove old matterclient lib (#2067)HEADmaster
Diffstat (limited to 'vendor/github.com/slack-go')
-rw-r--r--vendor/github.com/slack-go/slack/block.go1
-rw-r--r--vendor/github.com/slack-go/slack/block_conv.go5
-rw-r--r--vendor/github.com/slack-go/slack/block_element.go24
-rw-r--r--vendor/github.com/slack-go/slack/block_rich_text.go2
-rw-r--r--vendor/github.com/slack-go/slack/messages.go9
-rw-r--r--vendor/github.com/slack-go/slack/users.go1
6 files changed, 37 insertions, 5 deletions
diff --git a/vendor/github.com/slack-go/slack/block.go b/vendor/github.com/slack-go/slack/block.go
index 240f5527..18222bd2 100644
--- a/vendor/github.com/slack-go/slack/block.go
+++ b/vendor/github.com/slack-go/slack/block.go
@@ -50,6 +50,7 @@ type BlockAction struct {
SelectedConversations []string `json:"selected_conversations"`
SelectedDate string `json:"selected_date"`
SelectedTime string `json:"selected_time"`
+ SelectedDateTime int64 `json:"selected_date_time"`
InitialOption OptionBlockObject `json:"initial_option"`
InitialUser string `json:"initial_user"`
InitialChannel string `json:"initial_channel"`
diff --git a/vendor/github.com/slack-go/slack/block_conv.go b/vendor/github.com/slack-go/slack/block_conv.go
index 555e4811..4ab58de3 100644
--- a/vendor/github.com/slack-go/slack/block_conv.go
+++ b/vendor/github.com/slack-go/slack/block_conv.go
@@ -110,6 +110,8 @@ func (b *InputBlock) UnmarshalJSON(data []byte) error {
e = &DatePickerBlockElement{}
case "timepicker":
e = &TimePickerBlockElement{}
+ case "datetimepicker":
+ e = &DateTimePickerBlockElement{}
case "plain_text_input":
e = &PlainTextInputBlockElement{}
case "email_text_input":
@@ -190,6 +192,8 @@ func (b *BlockElements) UnmarshalJSON(data []byte) error {
blockElement = &DatePickerBlockElement{}
case "timepicker":
blockElement = &TimePickerBlockElement{}
+ case "datetimepicker":
+ blockElement = &DateTimePickerBlockElement{}
case "plain_text_input":
blockElement = &PlainTextInputBlockElement{}
case "email_text_input":
@@ -233,6 +237,7 @@ func (a *Accessory) MarshalJSON() ([]byte, error) {
// UnmarshalJSON implements the Unmarshaller interface for Accessory, so that any JSON
// unmarshalling is delegated and proper type determination can be made before unmarshal
+// Note: datetimepicker is not supported in Accessory
func (a *Accessory) UnmarshalJSON(data []byte) error {
var r json.RawMessage
diff --git a/vendor/github.com/slack-go/slack/block_element.go b/vendor/github.com/slack-go/slack/block_element.go
index aba29c6b..a70d8f2d 100644
--- a/vendor/github.com/slack-go/slack/block_element.go
+++ b/vendor/github.com/slack-go/slack/block_element.go
@@ -9,6 +9,7 @@ const (
METOverflow MessageElementType = "overflow"
METDatepicker MessageElementType = "datepicker"
METTimepicker MessageElementType = "timepicker"
+ METDatetimepicker MessageElementType = "datetimepicker"
METPlainTextInput MessageElementType = "plain_text_input"
METRadioButtons MessageElementType = "radio_buttons"
METEmailTextInput MessageElementType = "email_text_input"
@@ -392,6 +393,29 @@ func NewTimePickerBlockElement(actionID string) *TimePickerBlockElement {
}
}
+// DateTimePickerBlockElement defines an element that allows the selection of both
+// a date and a time of day formatted as a UNIX timestamp.
+// More Information: https://api.slack.com/reference/messaging/block-elements#datetimepicker
+type DateTimePickerBlockElement struct {
+ Type MessageElementType `json:"type"`
+ ActionID string `json:"action_id,omitempty"`
+ InitialDateTime int64 `json:"initial_date_time,omitempty"`
+ Confirm *ConfirmationBlockObject `json:"confirm,omitempty"`
+}
+
+// ElementType returns the type of the Element
+func (s DateTimePickerBlockElement) ElementType() MessageElementType {
+ return s.Type
+}
+
+// NewDatePickerBlockElement returns an instance of a datetime picker element
+func NewDateTimePickerBlockElement(actionID string) *DateTimePickerBlockElement {
+ return &DateTimePickerBlockElement{
+ Type: METDatetimepicker,
+ ActionID: actionID,
+ }
+}
+
// EmailTextInputBlockElement creates a field where a user can enter email
// data.
// email-text-input elements are currently only available in modals.
diff --git a/vendor/github.com/slack-go/slack/block_rich_text.go b/vendor/github.com/slack-go/slack/block_rich_text.go
index 555a6198..01e5cdb9 100644
--- a/vendor/github.com/slack-go/slack/block_rich_text.go
+++ b/vendor/github.com/slack-go/slack/block_rich_text.go
@@ -294,7 +294,7 @@ func NewRichTextSectionLinkElement(url, text string, style *RichTextSectionTextS
type RichTextSectionTeamElement struct {
Type RichTextSectionElementType `json:"type"`
TeamID string `json:"team_id"`
- Style *RichTextSectionTextStyle `json:"style.omitempty"`
+ Style *RichTextSectionTextStyle `json:"style,omitempty"`
}
func (r RichTextSectionTeamElement) RichTextSectionElementType() RichTextSectionElementType {
diff --git a/vendor/github.com/slack-go/slack/messages.go b/vendor/github.com/slack-go/slack/messages.go
index 33340456..13a1ede9 100644
--- a/vendor/github.com/slack-go/slack/messages.go
+++ b/vendor/github.com/slack-go/slack/messages.go
@@ -100,10 +100,11 @@ type Msg struct {
Members []string `json:"members,omitempty"`
// channels.replies, groups.replies, im.replies, mpim.replies
- ReplyCount int `json:"reply_count,omitempty"`
- Replies []Reply `json:"replies,omitempty"`
- ParentUserId string `json:"parent_user_id,omitempty"`
- LatestReply string `json:"latest_reply,omitempty"`
+ ReplyCount int `json:"reply_count,omitempty"`
+ ReplyUsers []string `json:"reply_users,omitempty"`
+ Replies []Reply `json:"replies,omitempty"`
+ ParentUserId string `json:"parent_user_id,omitempty"`
+ LatestReply string `json:"latest_reply,omitempty"`
// file_share, file_comment, file_mention
Files []File `json:"files,omitempty"`
diff --git a/vendor/github.com/slack-go/slack/users.go b/vendor/github.com/slack-go/slack/users.go
index 55f42118..a3b4c066 100644
--- a/vendor/github.com/slack-go/slack/users.go
+++ b/vendor/github.com/slack-go/slack/users.go
@@ -130,6 +130,7 @@ type User struct {
IsAppUser bool `json:"is_app_user"`
IsInvitedUser bool `json:"is_invited_user"`
Has2FA bool `json:"has_2fa"`
+ TwoFactorType *string `json:"two_factor_type"`
HasFiles bool `json:"has_files"`
Presence string `json:"presence"`
Locale string `json:"locale"`