diff options
author | Wim <wim@42.be> | 2017-09-18 21:18:31 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-09-18 21:18:31 +0200 |
commit | 82588b00c5e28ae3a8683410fd540c653469eb98 (patch) | |
tree | ab5690d2b58b80a8ddc414df636eefb65053b2f8 | |
parent | 603449e8500f1a0db14234c199352179a50aa157 (diff) | |
download | matterbridge-msglm-82588b00c5e28ae3a8683410fd540c653469eb98.tar.gz matterbridge-msglm-82588b00c5e28ae3a8683410fd540c653469eb98.tar.bz2 matterbridge-msglm-82588b00c5e28ae3a8683410fd540c653469eb98.zip |
Use override username if specified (mattermost). #260
-rw-r--r-- | bridge/mattermost/mattermost.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go index 6e5b3d38..41a3f273 100644 --- a/bridge/mattermost/mattermost.go +++ b/bridge/mattermost/mattermost.go @@ -220,6 +220,12 @@ func (b *Bmattermost) handleMatterClient(mchan chan *MMMessage) { if (message.Raw.Event == "post_edited") && b.Config.EditDisable { continue } + props := message.Post.Props + if props != nil { + if _, ok := props["override_username"].(string); ok { + message.Username = props["override_username"].(string) + } + } // do not post our own messages back to irc // only listen to message from our team if (message.Raw.Event == "posted" || message.Raw.Event == "post_edited" || message.Raw.Event == "post_deleted") && |