diff --git a/bridge/status/status.go b/bridge/status/status.go index 67d0db2e1a..7decc2e208 100644 --- a/bridge/status/status.go +++ b/bridge/status/status.go @@ -223,6 +223,10 @@ func (b *Bstatus) propagateMessage(msg *common.Message) { } } +func (b *Bstatus) nl2br(input string) string { + return strings.Replace(input, "\n", "
", -1) +} + // Converts a bridge message into a Status message func (b *Bstatus) toStatusMsg(msg config.Message) *common.Message { message := common.NewMessage() @@ -283,6 +287,8 @@ func (b *Bstatus) Send(msg config.Message) (string, error) { return "", fmt.Errorf("bridge %s not connected, dropping message %#v to bridge", b.Account, msg) } + msg.Text = b.nl2br(msg.Text) + b.Log.Debugf("=> Sending message %#v", msg) statusMessageToSend := b.toStatusMsg(msg)