summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/nlopes/slack/messages.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-07-16 14:29:46 +0200
committerWim <wim@42.be>2017-07-16 14:29:46 +0200
commitaec5e3d77b6e480d04dd8773723de62416a94919 (patch)
tree57ab269e6c46e62e61db04a9ca6fbb55e736519f /vendor/github.com/nlopes/slack/messages.go
parent335ddf8db543bf64522196e6928c3d10af64694c (diff)
downloadmatterbridge-msglm-aec5e3d77b6e480d04dd8773723de62416a94919.tar.gz
matterbridge-msglm-aec5e3d77b6e480d04dd8773723de62416a94919.tar.bz2
matterbridge-msglm-aec5e3d77b6e480d04dd8773723de62416a94919.zip
Update vendor (nlopes/slack)
Diffstat (limited to 'vendor/github.com/nlopes/slack/messages.go')
-rw-r--r--vendor/github.com/nlopes/slack/messages.go39
1 files changed, 26 insertions, 13 deletions
diff --git a/vendor/github.com/nlopes/slack/messages.go b/vendor/github.com/nlopes/slack/messages.go
index 3433e06b..39f0d6b1 100644
--- a/vendor/github.com/nlopes/slack/messages.go
+++ b/vendor/github.com/nlopes/slack/messages.go
@@ -2,10 +2,11 @@ package slack
// OutgoingMessage is used for the realtime API, and seems incomplete.
type OutgoingMessage struct {
- ID int `json:"id"`
- Channel string `json:"channel,omitempty"`
- Text string `json:"text,omitempty"`
- Type string `json:"type,omitempty"`
+ ID int `json:"id"`
+ Channel string `json:"channel,omitempty"`
+ Text string `json:"text,omitempty"`
+ Type string `json:"type,omitempty"`
+ ThreadTimestamp string `json:"thread_ts,omitempty"`
}
// Message is an auxiliary type to allow us to have a message containing sub messages
@@ -17,15 +18,16 @@ type Message struct {
// Msg contains information about a slack message
type Msg struct {
// Basic Message
- Type string `json:"type,omitempty"`
- Channel string `json:"channel,omitempty"`
- User string `json:"user,omitempty"`
- Text string `json:"text,omitempty"`
- Timestamp string `json:"ts,omitempty"`
- IsStarred bool `json:"is_starred,omitempty"`
- PinnedTo []string `json:"pinned_to, omitempty"`
- Attachments []Attachment `json:"attachments,omitempty"`
- Edited *Edited `json:"edited,omitempty"`
+ Type string `json:"type,omitempty"`
+ Channel string `json:"channel,omitempty"`
+ User string `json:"user,omitempty"`
+ Text string `json:"text,omitempty"`
+ Timestamp string `json:"ts,omitempty"`
+ ThreadTimestamp string `json:"thread_ts,omitempty"`
+ IsStarred bool `json:"is_starred,omitempty"`
+ PinnedTo []string `json:"pinned_to, omitempty"`
+ Attachments []Attachment `json:"attachments,omitempty"`
+ Edited *Edited `json:"edited,omitempty"`
// Message Subtypes
SubType string `json:"subtype,omitempty"`
@@ -56,6 +58,11 @@ type Msg struct {
// channel_archive, group_archive
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"`
+
// file_share, file_comment, file_mention
File *File `json:"file,omitempty"`
@@ -88,6 +95,12 @@ type Edited struct {
Timestamp string `json:"ts,omitempty"`
}
+// Reply contains information about a reply for a thread
+type Reply struct {
+ User string `json:"user,omitempty"`
+ Timestamp string `json:"ts,omitempty"`
+}
+
// Event contains the event type
type Event struct {
Type string `json:"type,omitempty"`