diff options
author | Wim <wim@42.be> | 2021-05-27 21:45:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 21:45:23 +0200 |
commit | c86137449e733fc643337f33eaa33daf9e16d73c (patch) | |
tree | 711cbfd7f64edfbf1780285b0f177afc2b3c472b /bridge/discord/discord.go | |
parent | efec01a92f3d7c3aec3ada8bf873d728e349eee6 (diff) | |
download | matterbridge-msglm-c86137449e733fc643337f33eaa33daf9e16d73c.tar.gz matterbridge-msglm-c86137449e733fc643337f33eaa33daf9e16d73c.tar.bz2 matterbridge-msglm-c86137449e733fc643337f33eaa33daf9e16d73c.zip |
Add a MessageClipped option to set your own clipped message. Closes #1359 (#1487)
Diffstat (limited to 'bridge/discord/discord.go')
-rw-r--r-- | bridge/discord/discord.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index 2fcf0abc..0ac2b50c 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -283,7 +283,7 @@ func (b *Bdiscord) handleEventBotUser(msg *config.Message, channelID string) (st // Upload a file if it exists if msg.Extra != nil { for _, rmsg := range helper.HandleExtra(msg, b.General) { - rmsg.Text = helper.ClipMessage(rmsg.Text, MessageLength) + rmsg.Text = helper.ClipMessage(rmsg.Text, MessageLength, b.GetString("MessageClipped")) if _, err := b.c.ChannelMessageSend(channelID, rmsg.Username+rmsg.Text); err != nil { b.Log.Errorf("Could not send message %#v: %s", rmsg, err) } @@ -294,7 +294,7 @@ func (b *Bdiscord) handleEventBotUser(msg *config.Message, channelID string) (st } } - msg.Text = helper.ClipMessage(msg.Text, MessageLength) + msg.Text = helper.ClipMessage(msg.Text, MessageLength, b.GetString("MessageClipped")) msg.Text = b.replaceUserMentions(msg.Text) // Edit message |