summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-07-03 22:41:09 +0200
committerWim <wim@42.be>2018-07-03 22:41:09 +0200
commitcb7278eb503498da4e1bcaf24b330d696832e57b (patch)
treedc94c2a862d82d353d30ed1d3189f234a1daef7c
parent89aa114192ceb42c34a945a0e8c8205166f8f970 (diff)
downloadmatterbridge-msglm-cb7278eb503498da4e1bcaf24b330d696832e57b.tar.gz
matterbridge-msglm-cb7278eb503498da4e1bcaf24b330d696832e57b.tar.bz2
matterbridge-msglm-cb7278eb503498da4e1bcaf24b330d696832e57b.zip
Use nickname instead of username if defined (mattermost). Closes #452
-rw-r--r--bridge/mattermost/mattermost.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index d828c4d1..30958a06 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -185,6 +185,9 @@ func (b *Bmattermost) handleMatter() {
for message := range messages {
message.Avatar = helper.GetAvatar(b.avatarMap, message.UserID, b.General)
message.Account = b.Account
+ if nick := b.mc.GetNickName(message.UserID); nick != "" {
+ message.Username = nick
+ }
message.Text, ok = b.replaceAction(message.Text)
if ok {
message.Event = config.EVENT_USER_ACTION