mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-21 10:12:00 -08:00
Limit discord username via webhook to 32 chars
This commit is contained in:
parent
0795906533
commit
c6fd65d1d7
@ -164,6 +164,10 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) {
|
||||
|
||||
msg.Text = helper.ClipMessage(msg.Text, MessageLength)
|
||||
msg.Text = b.replaceUserMentions(msg.Text)
|
||||
// discord username must be [0..32] max
|
||||
if len(msg.Username) > 32 {
|
||||
msg.Username = msg.Username[0:32]
|
||||
}
|
||||
err := b.c.WebhookExecute(
|
||||
wID,
|
||||
wToken,
|
||||
|
Loading…
Reference in New Issue
Block a user