summaryrefslogtreecommitdiffstats
path: root/bridge/sshchat
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-03 01:11:11 +0100
committerWim <wim@42.be>2018-02-03 01:11:11 +0100
commit80822b7fff85647ad5852b00ec36d046959aed92 (patch)
treef3f15769f5b75b53f97c3bedf1bbf6a1f9a909c8 /bridge/sshchat
parent78f1011f529981bab58556d9847488db04d00388 (diff)
downloadmatterbridge-msglm-80822b7fff85647ad5852b00ec36d046959aed92.tar.gz
matterbridge-msglm-80822b7fff85647ad5852b00ec36d046959aed92.tar.bz2
matterbridge-msglm-80822b7fff85647ad5852b00ec36d046959aed92.zip
Send chat notification if media is too big to be re-uploaded to MediaServer. See #359
Diffstat (limited to 'bridge/sshchat')
-rw-r--r--bridge/sshchat/sshchat.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/sshchat/sshchat.go b/bridge/sshchat/sshchat.go
index 1682b42e..e25cdbd9 100644
--- a/bridge/sshchat/sshchat.go
+++ b/bridge/sshchat/sshchat.go
@@ -3,6 +3,7 @@ package bsshchat
import (
"bufio"
"github.com/42wim/matterbridge/bridge/config"
+ "github.com/42wim/matterbridge/bridge/helper"
log "github.com/Sirupsen/logrus"
"github.com/shazow/ssh-chat/sshd"
"io"
@@ -62,6 +63,9 @@ func (b *Bsshchat) Send(msg config.Message) (string, error) {
}
flog.Debugf("Receiving %#v", msg)
if msg.Extra != nil {
+ for _, rmsg := range helper.HandleExtra(&msg, b.General) {
+ b.w.Write([]byte(rmsg.Username + rmsg.Text + "\r\n"))
+ }
if len(msg.Extra["file"]) > 0 {
for _, f := range msg.Extra["file"] {
fi := f.(config.FileInfo)