aboutsummaryrefslogtreecommitdiff
path: root/connector/mattermost
diff options
context:
space:
mode:
Diffstat (limited to 'connector/mattermost')
-rw-r--r--connector/mattermost/mattermost.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/connector/mattermost/mattermost.go b/connector/mattermost/mattermost.go
index 7c776d8..81adbde 100644
--- a/connector/mattermost/mattermost.go
+++ b/connector/mattermost/mattermost.go
@@ -327,12 +327,12 @@ func (mm *Mattermost) handlePosted(msg *model.WebSocketEvent) error {
}
userId := UserID(fmt.Sprintf("%s@%s", user.Username, mm.server))
- if lastdn, ok := mm.userdisplaynamemap[userId]; !ok || lastdn != user.Nickname {
- log.Warnf("Update displayname %s %s", userId, user.Nickname)
+ userDisp := user.GetDisplayName(model.SHOW_NICKNAME_FULLNAME)
+ if lastdn, ok := mm.userdisplaynamemap[userId]; !ok || lastdn != userDisp {
mm.handler.UserInfoUpdated(userId, &UserInfo{
- DisplayName: user.Nickname,
+ DisplayName: userDisp,
})
- mm.userdisplaynamemap[userId] = user.Nickname
+ mm.userdisplaynamemap[userId] = userDisp
}
// Build message event