From 5697772ee380eb02efc0606edb024f0c1448f859 Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Tue, 23 Oct 2018 17:39:48 +0800 Subject: [PATCH] Removed newlines from link to untranslated message. --- bridge/slack/slack.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 3ea796f0..637eb515 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -296,6 +296,7 @@ func (b *Bslack) createTranslationAttach(msg config.Message) slack.Attachment { if len(msg.TranslationSrcMsg.Text) > previewCharCount { untranslatedTextPreview = untranslatedTextPreview[:previewCharCount]+"..." } + untranslatedTextPreview = strings.Replace(untranslatedTextPreview, "\n", " ", -1) ch, err := b.getChannelByName(msg.TranslationSrcMsg.Channel) time := strings.Split(msg.TranslationSrcMsg.ID, " ")[1] params := slack.PermalinkParameters{