Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 4eef5c50216efb3a17008ee99f3e8c3747ee8cce Author: Wim <wim@42.be> Date: Mon Sep 18 21:18:31 2017 +0000 Use override username if specified (mattermost). #260 diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go index 6e5b3d3..41a3f27 100644 --- a/bridge/mattermost/mattermost.go +++ b/bridge/mattermost/mattermost.go @@ -2206 +22012 @@ 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") &&