Skip to content

Commit

Permalink
Clip too long messages on 3000 length (slack). Fixes #1081
Browse files Browse the repository at this point in the history
  • Loading branch information
42wim committed Apr 19, 2020
1 parent 4d93a77 commit c5f643f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bridge/slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const (
editSuffixConfig = "EditSuffix"
iconURLConfig = "iconurl"
noSendJoinConfig = "nosendjoinpart"
messageLength = 3000
)

func New(cfg *bridge.Config) bridge.Bridger {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c5f643f

Please sign in to comment.