diff options
author | Wim <wim@42.be> | 2017-07-31 21:37:19 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-07-31 21:37:19 +0200 |
commit | f2483af561858d86eee32e048698c75436e3c811 (patch) | |
tree | 24f6533ea19819b73ba3af34c78a4b36036eca90 | |
parent | c28b87641e284940a7e548ddbe03b9ca156be294 (diff) | |
download | matterbridge-msglm-f2483af561858d86eee32e048698c75436e3c811.tar.gz matterbridge-msglm-f2483af561858d86eee32e048698c75436e3c811.tar.bz2 matterbridge-msglm-f2483af561858d86eee32e048698c75436e3c811.zip |
Do not modify username in action (discord)
-rw-r--r-- | bridge/discord/discord.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index c74cf902..926aa807 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -114,18 +114,14 @@ 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, |