5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 21:50:28 +00:00

Use override username if specified (mattermost). #260

This commit is contained in:
Wim 2017-09-18 21:18:31 +02:00
parent 603449e850
commit 82588b00c5

View File

@ -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") &&