mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 04:09:24 +00:00
Send chat notification if media is too big to be re-uploaded to MediaServer. See #359
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user