4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 16:39:24 +00:00

Handle file comment better

This commit is contained in:
Wim
2018-05-06 16:57:59 +02:00
parent 346a7284f7
commit 72ce7f06e9
4 changed files with 13 additions and 1 deletions

View File

@ -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 {