mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-26 07:29:24 +00:00
Send chat notification if media is too big to be re-uploaded to MediaServer. See #359
This commit is contained in:
@ -171,7 +171,8 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM
|
||||
dest.Protocol != "mattermost" &&
|
||||
dest.Protocol != "telegram" &&
|
||||
dest.Protocol != "matrix" &&
|
||||
dest.Protocol != "xmpp" {
|
||||
dest.Protocol != "xmpp" &&
|
||||
len(msg.Extra[config.EVENT_FILE_FAILURE_SIZE]) == 0 {
|
||||
if msg.Text == "" {
|
||||
return brMsgIDs
|
||||
}
|
||||
@ -235,7 +236,10 @@ func (gw *Gateway) ignoreMessage(msg *config.Message) bool {
|
||||
}
|
||||
if msg.Text == "" {
|
||||
// we have an attachment or actual bytes
|
||||
if msg.Extra != nil && (msg.Extra["attachments"] != nil || len(msg.Extra["file"]) > 0) {
|
||||
if msg.Extra != nil &&
|
||||
(msg.Extra["attachments"] != nil ||
|
||||
len(msg.Extra["file"]) > 0 ||
|
||||
len(msg.Extra[config.EVENT_FILE_FAILURE_SIZE]) > 0) {
|
||||
return false
|
||||
}
|
||||
log.Debugf("ignoring empty message %#v from %s", msg, msg.Account)
|
||||
|
Reference in New Issue
Block a user