mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-24 04:02:37 +01:00
Remove newline splitting from outgoing mattermost messages. Should be handled by receiving bridge.
This commit is contained in:
parent
3ca4309e8a
commit
8c6be434ac
@ -5,7 +5,6 @@ import (
|
|||||||
"github.com/42wim/matterbridge/matterclient"
|
"github.com/42wim/matterbridge/matterclient"
|
||||||
"github.com/42wim/matterbridge/matterhook"
|
"github.com/42wim/matterbridge/matterhook"
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/Sirupsen/logrus"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type MMhook struct {
|
type MMhook struct {
|
||||||
@ -146,11 +145,8 @@ func (b *Bmattermost) handleMatter() {
|
|||||||
go b.handleMatterHook(mchan)
|
go b.handleMatterHook(mchan)
|
||||||
}
|
}
|
||||||
for message := range mchan {
|
for message := range mchan {
|
||||||
texts := strings.Split(message.Text, "\n")
|
|
||||||
for _, text := range texts {
|
|
||||||
flog.Debugf("Sending message from %s on %s to gateway", message.Username, b.FullOrigin())
|
flog.Debugf("Sending message from %s on %s to gateway", message.Username, b.FullOrigin())
|
||||||
b.Remote <- config.Message{Text: text, Username: message.Username, Channel: message.Channel, Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()}
|
b.Remote <- config.Message{Text: message.Text, Username: message.Username, Channel: message.Channel, Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user