mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-23 02:21:36 +00:00
Do not modify username in action (discord)
This commit is contained in:
parent
c28b87641e
commit
f2483af561
@ -114,18 +114,14 @@ func (b *bdiscord) Send(msg config.Message) error {
|
|||||||
flog.Errorf("Could not find channelID for %v", msg.Channel)
|
flog.Errorf("Could not find channelID for %v", msg.Channel)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
if msg.Event == config.EVENT_USER_ACTION {
|
||||||
|
msg.Text = "_" + msg.Text + "_"
|
||||||
|
}
|
||||||
if b.Config.WebhookURL == "" {
|
if b.Config.WebhookURL == "" {
|
||||||
flog.Debugf("Broadcasting using token (API)")
|
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)
|
b.c.ChannelMessageSend(channelID, msg.Username+msg.Text)
|
||||||
} else {
|
} else {
|
||||||
flog.Debugf("Broadcasting using Webhook")
|
flog.Debugf("Broadcasting using Webhook")
|
||||||
if msg.Event == config.EVENT_USER_ACTION {
|
|
||||||
msg.Text = "_" + msg.Text + "_"
|
|
||||||
}
|
|
||||||
b.c.WebhookExecute(
|
b.c.WebhookExecute(
|
||||||
b.webhookID,
|
b.webhookID,
|
||||||
b.webhookToken,
|
b.webhookToken,
|
||||||
|
Loading…
Reference in New Issue
Block a user