From e564c555d7c1396e27310d24fb12818666694c4d Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 19 Apr 2020 17:00:11 +0200 Subject: [PATCH] Clip too long messages on 3000 length (slack). Fixes #1081 (#1102) --- bridge/slack/slack.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 551e8a78..a9a89c31 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -64,6 +64,7 @@ const ( editSuffixConfig = "EditSuffix" iconURLConfig = "iconurl" noSendJoinConfig = "nosendjoinpart" + messageLength = 3000 ) func New(cfg *bridge.Config) bridge.Bridger { @@ -194,6 +195,7 @@ func (b *Bslack) Send(msg config.Message) (string, error) { b.Log.Debugf("=> Receiving %#v", msg) } + msg.Text = helper.ClipMessage(msg.Text, messageLength) msg.Text = b.replaceCodeFence(msg.Text) // Make a action /me of the message