diff options
author | Wim <wim@42.be> | 2016-09-29 23:32:12 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2016-09-29 23:32:12 +0200 |
commit | 8c6be434accd05e8475936b20231a57403a091ef (patch) | |
tree | 733402a8d8c3b7d05ec446ae286073e076009e67 /bridge | |
parent | 3ca4309e8ab7de556c45729f5f7a3ee03f61cad3 (diff) | |
download | matterbridge-msglm-8c6be434accd05e8475936b20231a57403a091ef.tar.gz matterbridge-msglm-8c6be434accd05e8475936b20231a57403a091ef.tar.bz2 matterbridge-msglm-8c6be434accd05e8475936b20231a57403a091ef.zip |
Remove newline splitting from outgoing mattermost messages. Should be handled by receiving bridge.
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/mattermost/mattermost.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go index 2f4b4133..ec81e795 100644 --- a/bridge/mattermost/mattermost.go +++ b/bridge/mattermost/mattermost.go @@ -5,7 +5,6 @@ import ( "github.com/42wim/matterbridge/matterclient" "github.com/42wim/matterbridge/matterhook" log "github.com/Sirupsen/logrus" - "strings" ) type MMhook struct { @@ -146,11 +145,8 @@ func (b *Bmattermost) handleMatter() { go b.handleMatterHook(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()) - b.Remote <- config.Message{Text: text, Username: message.Username, Channel: message.Channel, Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()} - } + flog.Debugf("Sending message from %s on %s to gateway", message.Username, b.FullOrigin()) + b.Remote <- config.Message{Text: message.Text, Username: message.Username, Channel: message.Channel, Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()} } } |