parent
0c874120cf
commit
33b36241a1
@ -154,14 +154,7 @@ func (s *SlackService) GetMessages(channel interface{}, count int) []string {
|
|||||||
messages = append(messages, msg...)
|
messages = append(messages, msg...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reverse the order of the messages, we want the newest in
|
return messages
|
||||||
// the last place
|
|
||||||
var messagesReversed []string
|
|
||||||
for i := len(messages) - 1; i >= 0; i-- {
|
|
||||||
messagesReversed = append(messagesReversed, messages[i])
|
|
||||||
}
|
|
||||||
|
|
||||||
return messagesReversed
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateMessage will create a string formatted message that can be rendered
|
// CreateMessage will create a string formatted message that can be rendered
|
||||||
@ -227,7 +220,14 @@ func (s *SlackService) CreateMessage(message slack.Message) []string {
|
|||||||
|
|
||||||
msgs = append(msgs, msg)
|
msgs = append(msgs, msg)
|
||||||
|
|
||||||
return msgs
|
// Reverse the order of the messages, we want the newest in
|
||||||
|
// the last place
|
||||||
|
var messagesReversed []string
|
||||||
|
for i := len(msgs) - 1; i >= 0; i-- {
|
||||||
|
messagesReversed = append(messagesReversed, msgs[i])
|
||||||
|
}
|
||||||
|
|
||||||
|
return messagesReversed
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SlackService) CreateMessageFromMessageEvent(message *slack.MessageEvent) []string {
|
func (s *SlackService) CreateMessageFromMessageEvent(message *slack.MessageEvent) []string {
|
||||||
@ -287,7 +287,14 @@ func (s *SlackService) CreateMessageFromMessageEvent(message *slack.MessageEvent
|
|||||||
|
|
||||||
msgs = append(msgs, msg)
|
msgs = append(msgs, msg)
|
||||||
|
|
||||||
return msgs
|
// Reverse the order of the messages, we want the newest in
|
||||||
|
// the last place
|
||||||
|
var messagesReversed []string
|
||||||
|
for i := len(msgs) - 1; i >= 0; i-- {
|
||||||
|
messagesReversed = append(messagesReversed, msgs[i])
|
||||||
|
}
|
||||||
|
|
||||||
|
return messagesReversed
|
||||||
}
|
}
|
||||||
|
|
||||||
// createMessageFromAttachments will construct a array of string of the Field
|
// createMessageFromAttachments will construct a array of string of the Field
|
||||||
|
Loading…
x
Reference in New Issue
Block a user