diff options
-rw-r--r-- | bridge/gitter/gitter.go | 3 | ||||
-rw-r--r-- | bridge/irc/irc.go | 3 | ||||
-rw-r--r-- | bridge/sshchat/sshchat.go | 3 | ||||
-rw-r--r-- | bridge/xmpp/xmpp.go | 5 |
4 files changed, 13 insertions, 1 deletions
diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go index 853640f5..faa86e5a 100644 --- a/bridge/gitter/gitter.go +++ b/bridge/gitter/gitter.go @@ -168,6 +168,9 @@ 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 ccaf0276..83184008 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -201,6 +201,9 @@ 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 3204d734..343fc66a 100644 --- a/bridge/sshchat/sshchat.go +++ b/bridge/sshchat/sshchat.go @@ -68,6 +68,9 @@ 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 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 { |