commit 366d5d087677d6cfa5eeca162c27348accfc58ec
Author: Wim <wim@42.be>
Date: Sun May 06 16:57:59 2018 +0000
diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go
index 853640f..faa86e5 100644
--- a/bridge/gitter/gitter.go
+++ b/bridge/gitter/gitter.go
@@ -1686 +1689 @@ func (b *Bgitter) handleUploadFile(msg *config.Message, roomID string) (string,
}
if fi.URL != "" {
msg.Text = fi.URL
+ if fi.Comment != "" {
+ msg.Text = fi.Comment + ": " + fi.URL
+ }
}
_, err := b.c.SendMessage(roomID, msg.Username+msg.Text)
if err != nil {
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index ccaf027..8318400 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -2016 +2019 @@ func (b *Birc) Send(msg config.Message) (string, error) {
}
if fi.URL != "" {
msg.Text = fi.URL
+ if fi.Comment != "" {
+ msg.Text = fi.Comment + ": " + fi.URL
+ }
}
b.Local <- config.Message{Text: msg.Text, Username: msg.Username, Channel: msg.Channel, Event: msg.Event}
}
diff --git a/bridge/sshchat/sshchat.go b/bridge/sshchat/sshchat.go
index 3204d73..343fc66 100644
--- a/bridge/sshchat/sshchat.go
+++ b/bridge/sshchat/sshchat.go
@@ -686 +689 @@ func (b *Bsshchat) Send(msg config.Message) (string, error) {
}
if fi.URL != "" {
msg.Text = fi.URL
+ if fi.Comment != "" {
+ msg.Text = fi.Comment + ": " + fi.URL
+ }
}
b.w.Write([]byte(msg.Username + msg.Text))
}
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go
index 54f5482..17cadf0 100644
--- a/bridge/xmpp/xmpp.go
+++ b/bridge/xmpp/xmpp.go
@@ -1867 +18610 @@ 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 {