mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-26 10:02:06 +00:00
Use override username if specified (mattermost). #260
This commit is contained in:
parent
603449e850
commit
82588b00c5
@ -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") &&
|
||||
|
Loading…
Reference in New Issue
Block a user