commit ba7741cdf50c35736ce19c034ace83fce254efff
Author: Wim <wim@42.be>
Date: Sat Jun 16 00:11:15 2018 +0000
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index 14c71af..d828c4d 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -2216 +22118 @@ func (b *Bmattermost) handleMatterClient(messages chan *config.Message) {
}
if _, ok := props["attachments"].([]interface{}); ok {
rmsg.Extra["attachments"] = props["attachments"].([]interface{})
+ if rmsg.Text == "" {
+ for _, attachment := range rmsg.Extra["attachments"] {
+ attach := attachment.(map[string]interface{})
+ if attach["text"].(string) != "" {
+ rmsg.Text += attach["text"].(string)
+ continue
+ }
+ if attach["fallback"].(string) != "" {
+ rmsg.Text += attach["fallback"].(string)
+ }
+ }
+ }
}
}