Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 135a94d581ee942e9240401a5d859f5860c927de Author: Wim <wim@42.be> Date: Mon Jul 31 21:37:19 2017 +0000 Do not modify username in action (discord) diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index c74cf90..926aa80 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -11418 +11414 @@ func (b *bdiscord) Send(msg config.Message) error {   flog.Errorf("Could not find channelID for %v", msg.Channel)   return nil   } + if msg.Event == config.EVENT_USER_ACTION { + msg.Text = "_" + msg.Text + "_" + }   if b.Config.WebhookURL == "" {   flog.Debugf("Broadcasting using token (API)") - if msg.Event == config.EVENT_USER_ACTION { - msg.Username = "_" + msg.Username - msg.Text = msg.Text + "_" - }   b.c.ChannelMessageSend(channelID, msg.Username+msg.Text)   } else {   flog.Debugf("Broadcasting using Webhook") - if msg.Event == config.EVENT_USER_ACTION { - msg.Text = "_" + msg.Text + "_" - }   b.c.WebhookExecute(   b.webhookID,   b.webhookToken,