diff options
author | Wim <wim@42.be> | 2020-04-19 17:00:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 17:00:11 +0200 |
commit | e564c555d7c1396e27310d24fb12818666694c4d (patch) | |
tree | 3888b0841e9e0b7cd3f38cdc0d17c78419c2cd45 /bridge/slack | |
parent | f7ec9af9e8571aabddb1aace920d0ace983602e7 (diff) | |
download | matterbridge-msglm-e564c555d7c1396e27310d24fb12818666694c4d.tar.gz matterbridge-msglm-e564c555d7c1396e27310d24fb12818666694c4d.tar.bz2 matterbridge-msglm-e564c555d7c1396e27310d24fb12818666694c4d.zip |
Clip too long messages on 3000 length (slack). Fixes #1081 (#1102)
Diffstat (limited to 'bridge/slack')
-rw-r--r-- | bridge/slack/slack.go | 2 |
1 files changed, 2 insertions, 0 deletions
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 |