summaryrefslogtreecommitdiffstats
path: root/bridge/discord/discord.go
diff options
context:
space:
mode:
authoranon724 <30612019+anon724@users.noreply.github.com>2017-08-01 09:18:55 -0700
committerWim <wim@42.be>2017-08-01 18:18:55 +0200
commit67905089ba1609e52984b5bb9c7e0bf27c2cbbb9 (patch)
tree6879c74b9e3d93e872ee67c248711b39b15648ff /bridge/discord/discord.go
parentf2483af561858d86eee32e048698c75436e3c811 (diff)
downloadmatterbridge-msglm-67905089ba1609e52984b5bb9c7e0bf27c2cbbb9.tar.gz
matterbridge-msglm-67905089ba1609e52984b5bb9c7e0bf27c2cbbb9.tar.bz2
matterbridge-msglm-67905089ba1609e52984b5bb9c7e0bf27c2cbbb9.zip
Add UseUserName option (discord) (#234)
Diffstat (limited to 'bridge/discord/discord.go')
-rw-r--r--bridge/discord/discord.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go
index 926aa807..4b325653 100644
--- a/bridge/discord/discord.go
+++ b/bridge/discord/discord.go
@@ -181,7 +181,12 @@ func (b *bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat
if b.UseChannelID {
rmsg.Channel = "ID:" + m.ChannelID
}
- rmsg.Username = b.getNick(m.Author)
+
+ if !b.Config.UseUserName {
+ rmsg.Username = b.getNick(m.Author)
+ } else {
+ rmsg.Username = m.Author.Username
+ }
if b.Config.ShowEmbeds && m.Message.Embeds != nil {
for _, embed := range m.Message.Embeds {