mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-23 19:22:03 -08:00
Remove newline character in bridge multiline messages (mumble) (#1572)
This commit is contained in:
parent
44f3e2557d
commit
86151da271
@ -8,6 +8,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"layeh.com/gumble/gumble"
|
"layeh.com/gumble/gumble"
|
||||||
@ -252,8 +253,10 @@ func (b *Bmumble) processMessage(msg *config.Message) {
|
|||||||
} else {
|
} else {
|
||||||
msgLines = helper.GetSubLines(msg.Text, 0, b.GetString("MessageClipped"))
|
msgLines = helper.GetSubLines(msg.Text, 0, b.GetString("MessageClipped"))
|
||||||
}
|
}
|
||||||
// Send the individual lindes
|
// Send the individual lines
|
||||||
for i := range msgLines {
|
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)
|
b.client.Self.Channel.Send(msg.Username+msgLines[i], false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user