mirror of
https://github.com/42wim/matterbridge
synced 2024-11-19 03:25:33 +00:00
Use nickname instead of username if defined (mattermost). Closes #452
This commit is contained in:
parent
89aa114192
commit
cb7278eb50
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user