2019-11-13 00:45:56 +00:00
|
|
|
package main
|
|
|
|
|
2019-11-21 23:45:04 +00:00
|
|
|
import "github.com/nlopes/slack"
|
2019-11-13 00:45:56 +00:00
|
|
|
|
|
|
|
// This message type is for communications over the messages channel
|
|
|
|
type BotMessage struct {
|
|
|
|
source string
|
|
|
|
dest string
|
|
|
|
message slack.Message
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewBotMessage(src, dst string, msg slack.Message) BotMessage {
|
|
|
|
return BotMessage{
|
|
|
|
source: src,
|
|
|
|
dest: dst,
|
|
|
|
message: msg,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m BotMessage) GetSource() string { return m.source }
|
|
|
|
func (m BotMessage) GetDestination() string { return m.dest }
|
|
|
|
func (m BotMessage) GetMessage() slack.Message { return m.message }
|