mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 08:29:25 +01: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 {
|
if (message.Raw.Event == "post_edited") && b.Config.EditDisable {
|
||||||
continue
|
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
|
// do not post our own messages back to irc
|
||||||
// only listen to message from our team
|
// only listen to message from our team
|
||||||
if (message.Raw.Event == "posted" || message.Raw.Event == "post_edited" || message.Raw.Event == "post_deleted") &&
|
if (message.Raw.Event == "posted" || message.Raw.Event == "post_edited" || message.Raw.Event == "post_deleted") &&
|
||||||
|
Loading…
Reference in New Issue
Block a user