Fix some slack integrations
Fixes #13 For instance the github integration doesn't have a discoverable username, so this will become unkown. Some integrations with attachment fields, title and text should be tested for the correct order.
This commit is contained in:
parent
bc29c82f99
commit
9284355b80
@ -260,7 +260,7 @@ func (s *SlackService) CreateMessageFromMessageEvent(message *slack.MessageEvent
|
||||
var msgs []string
|
||||
var name string
|
||||
|
||||
// Append (edited) when and edit message is received
|
||||
// Append (edited) when an edited message is received
|
||||
if message.SubType == "message_changed" {
|
||||
message = &slack.MessageEvent{Msg: *message.SubMessage}
|
||||
message.Text = fmt.Sprintf("%s (edited)", message.Text)
|
||||
@ -335,6 +335,15 @@ func createMessageFromAttachments(atts []slack.Attachment) []string {
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
if att.Text != "" {
|
||||
msgs = append(msgs, att.Text)
|
||||
}
|
||||
|
||||
if att.Title != "" {
|
||||
msgs = append(msgs, att.Title)
|
||||
}
|
||||
}
|
||||
|
||||
return msgs
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user