diff options
Diffstat (limited to 'bridge/mattermost')
-rw-r--r-- | bridge/mattermost/handlers.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bridge/mattermost/handlers.go b/bridge/mattermost/handlers.go index 5ad40115..00c9445d 100644 --- a/bridge/mattermost/handlers.go +++ b/bridge/mattermost/handlers.go @@ -177,8 +177,10 @@ func (b *Bmattermost) handleMatterClient(messages chan *config.Message) { } // Use nickname instead of username if defined - if nick := b.mc.GetNickName(rmsg.UserID); nick != "" { - rmsg.Username = nick + if !b.GetBool("useusername") { + if nick := b.mc.GetNickName(rmsg.UserID); nick != "" { + rmsg.Username = nick + } } messages <- rmsg @@ -232,8 +234,10 @@ func (b *Bmattermost) handleMatterClient6(messages chan *config.Message) { } // Use nickname instead of username if defined - if nick := b.mc6.GetNickName(rmsg.UserID); nick != "" { - rmsg.Username = nick + if !b.GetBool("useusername") { + if nick := b.mc6.GetNickName(rmsg.UserID); nick != "" { + rmsg.Username = nick + } } messages <- rmsg |