summaryrefslogtreecommitdiffstats
path: root/bridge/mumble
diff options
context:
space:
mode:
authorpowerjungle <fabsidereal@gmail.com>2021-08-22 23:17:37 +0200
committerGitHub <noreply@github.com>2021-08-22 23:17:37 +0200
commit86151da271bcd9179d9268fb46eb8edcebd13784 (patch)
treeeda3edc4e1f161bddb8c69c3cb95e72d9dbe2050 /bridge/mumble
parent44f3e2557dad86129419ed098c29e67638519f4f (diff)
downloadmatterbridge-msglm-86151da271bcd9179d9268fb46eb8edcebd13784.tar.gz
matterbridge-msglm-86151da271bcd9179d9268fb46eb8edcebd13784.tar.bz2
matterbridge-msglm-86151da271bcd9179d9268fb46eb8edcebd13784.zip
Remove newline character in bridge multiline messages (mumble) (#1572)
Diffstat (limited to 'bridge/mumble')
-rw-r--r--bridge/mumble/mumble.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/bridge/mumble/mumble.go b/bridge/mumble/mumble.go
index d678e0fb..d27d8caa 100644
--- a/bridge/mumble/mumble.go
+++ b/bridge/mumble/mumble.go
@@ -8,6 +8,7 @@ import (
"io/ioutil"
"net"
"strconv"
+ "strings"
"time"
"layeh.com/gumble/gumble"
@@ -252,8 +253,10 @@ func (b *Bmumble) processMessage(msg *config.Message) {
} else {
msgLines = helper.GetSubLines(msg.Text, 0, b.GetString("MessageClipped"))
}
- // Send the individual lindes
+ // Send the individual lines
for i := range msgLines {
+ // Remove unnecessary newline character, since either way we're sending it as individual lines
+ msgLines[i] = strings.TrimSuffix(msgLines[i], "\n")
b.client.Self.Channel.Send(msg.Username+msgLines[i], false)
}
}