5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-14 03:50:26 +00:00

Do not break messages on newline (slack). Closes #258

This commit is contained in:
Wim 2017-09-10 18:19:33 +02:00
parent 86cd7f1ba6
commit 90a61f15cc

View File

@ -234,8 +234,7 @@ func (b *Bslack) handleSlack() {
if message.Text == "" || message.Username == "" { if message.Text == "" || message.Username == "" {
continue continue
} }
texts := strings.Split(message.Text, "\n") text := message.Text
for _, text := range texts {
text = b.replaceURL(text) text = b.replaceURL(text)
text = html.UnescapeString(text) text = html.UnescapeString(text)
flog.Debugf("Sending message from %s on %s to gateway", message.Username, b.Account) flog.Debugf("Sending message from %s on %s to gateway", message.Username, b.Account)
@ -254,7 +253,6 @@ func (b *Bslack) handleSlack() {
b.Remote <- msg b.Remote <- msg
} }
} }
}
func (b *Bslack) handleSlackClient(mchan chan *MMMessage) { func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
for msg := range b.rtm.IncomingEvents { for msg := range b.rtm.IncomingEvents {