commit 89f78e02c01a8c49d7a1a87c1c2c19cdadef0fc9
Author: Declan Hoare <declanhoare@exemail.com.au>
Date: Sat Feb 23 00:28:27 2019 +0000
diff --git a/bridge/config/config.go b/bridge/config/config.go
index f473ab0..7ab6aef 100644
--- a/bridge/config/config.go
+++ b/bridge/config/config.go
@@ -1366 +1367 @@ type Protocol struct {
UseAPI bool // mattermost, slack
UseSASL bool // IRC
UseTLS bool // IRC
+ UseDiscriminator bool // discord
UseFirstName bool // telegram
UseUserName bool // discord
UseInsecureURL bool // telegram
diff --git a/bridge/discord/handlers.go b/bridge/discord/handlers.go
index 85bac2e..85a36e1 100644
--- a/bridge/discord/handlers.go
+++ b/bridge/discord/handlers.go
@@ -716 +719 @@ func (b *Bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat
rmsg.Username = b.getNick(m.Author)
} else {
rmsg.Username = m.Author.Username
+ if b.GetBool("UseDiscriminator") {
+ rmsg.Username += "#" + m.Author.Discriminator
+ }
}
// if we have embedded content add it to text
diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample
index 55f3ab7..33aebea 100644
--- a/matterbridge.toml.sample
+++ b/matterbridge.toml.sample
@@ -71010 +71014 @@ Server="yourservername"
#OPTIONAL (default false)
ShowEmbeds=false
-#Shows the username (minus the discriminator) instead of the server nickname
+#Shows the username instead of the server nickname
#OPTIONAL (default false)
UseUserName=false
+#Show #xxxx discriminator with UseUserName
+#OPTIONAL (default false)
+UseDiscriminator=false
+
#Specify WebhookURL. If given, will relay messages using the Webhook, which gives a better look to messages.
#This only works if you have one discord channel, if you have multiple discord channels you'll have to specify it in the gateway config
#OPTIONAL (default empty)