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

Send chat notification if media is too big to be re-uploaded to MediaServer. See #359

This commit is contained in:
Wim
2018-02-03 01:11:11 +01:00
parent 78f1011f52
commit 80822b7fff
13 changed files with 124 additions and 14 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/42wim/go-gitter"
"github.com/42wim/matterbridge/bridge/config"
"github.com/42wim/matterbridge/bridge/helper"
log "github.com/Sirupsen/logrus"
"strings"
)
@ -121,6 +122,9 @@ func (b *Bgitter) Send(msg config.Message) (string, error) {
}
if msg.Extra != nil {
for _, rmsg := range helper.HandleExtra(&msg, b.General) {
b.c.SendMessage(roomID, rmsg.Username+rmsg.Text)
}
if len(msg.Extra["file"]) > 0 {
for _, f := range msg.Extra["file"] {
fi := f.(config.FileInfo)