summaryrefslogtreecommitdiffstats
path: root/bridge/xmpp
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-05-06 16:57:59 +0200
committerWim <wim@42.be>2018-05-06 16:57:59 +0200
commit72ce7f06e9bfc2a665f034f4099ed6eb79637f5c (patch)
tree8aa4c5c75f3a815880ae9f9e4ea761c3620d8865 /bridge/xmpp
parent346a7284f75373bd5a852dcdccda6d508bed6c5a (diff)
downloadmatterbridge-msglm-72ce7f06e9bfc2a665f034f4099ed6eb79637f5c.tar.gz
matterbridge-msglm-72ce7f06e9bfc2a665f034f4099ed6eb79637f5c.tar.bz2
matterbridge-msglm-72ce7f06e9bfc2a665f034f4099ed6eb79637f5c.zip
Handle file comment better
Diffstat (limited to 'bridge/xmpp')
-rw-r--r--bridge/xmpp/xmpp.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go
index 54f54826..17cadf06 100644
--- a/bridge/xmpp/xmpp.go
+++ b/bridge/xmpp/xmpp.go
@@ -186,7 +186,10 @@ func (b *Bxmpp) handleUploadFile(msg *config.Message) (string, error) {
msg.Text += fi.Comment + ": "
}
if fi.URL != "" {
- msg.Text += fi.URL
+ msg.Text = fi.URL
+ if fi.Comment != "" {
+ msg.Text = fi.Comment + ": " + fi.URL
+ }
}
_, err := b.xc.Send(xmpp.Chat{Type: "groupchat", Remote: msg.Channel + "@" + b.GetString("Muc"), Text: msg.Username + msg.Text})
if err != nil {