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 { Name string `json:"name"` Messages []Message `json:"messages"` // 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"` }
Conversation keeps the slice of messages.
func (Conversation) IsThread ¶
func (c Conversation) IsThread() bool
func (Conversation) String ¶
func (c Conversation) String() string
func (Conversation) ToText ¶
func (c Conversation) ToText(w io.Writer, userIdx structures.UserIndex) (err error)
ToText outputs Messages m to io.Writer w in text format.
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.