Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortMessages ¶
func SortMessages(msgs []Message)
Types ¶
type Conversation ¶
type Conversation struct { // ID is the channel ID. ID string `json:"channel_id"` // ThreadTS is a thread timestamp. If it's not empty, it means that it's a // dump of a thread, not a channel. ThreadTS string `json:"thread_ts,omitempty"` // Name is the channel name. Name string `json:"name"` // Messages is a slice of messages. Messages []Message `json:"messages"` }
Conversation keeps the slice of messages.
func (Conversation) IsThread ¶
func (c Conversation) IsThread() bool
IsThread returns true if the conversation is a thread.
func (Conversation) String ¶
func (c Conversation) String() string
func (Conversation) UserIDs ¶
func (c Conversation) UserIDs() []string
UserIDs returns a slice of user IDs.
type Message ¶
type Message struct { slack.Message ThreadReplies []Message `json:"slackdump_thread_replies,omitempty"` }
Message is the internal representation of message with thread.
func ConvertMsgs ¶
ConvertMsgs converts a slice of slack.Message to []types.Message.
func (Message) IsBotMessage ¶
IsBotMessage returns true if the message is from a bot.
func (Message) IsThreadChild ¶
IsThreadChild will return true if the message is the child message of a conversation.
func (Message) IsThreadParent ¶
IsThreadChild will return true if the message is the parent message of a conversation (has more than 0 replies)
Click to show internal directories.
Click to hide internal directories.