5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-29 14:01:35 +00:00

Use nickname instead of username if defined (mattermost). Closes #452

This commit is contained in:
Wim 2018-07-03 22:41:09 +02:00
parent 89aa114192
commit cb7278eb50

View File

@ -185,6 +185,9 @@ func (b *Bmattermost) handleMatter() {
for message := range messages { for message := range messages {
message.Avatar = helper.GetAvatar(b.avatarMap, message.UserID, b.General) message.Avatar = helper.GetAvatar(b.avatarMap, message.UserID, b.General)
message.Account = b.Account message.Account = b.Account
if nick := b.mc.GetNickName(message.UserID); nick != "" {
message.Username = nick
}
message.Text, ok = b.replaceAction(message.Text) message.Text, ok = b.replaceAction(message.Text)
if ok { if ok {
message.Event = config.EVENT_USER_ACTION message.Event = config.EVENT_USER_ACTION