summaryrefslogtreecommitdiffstats
path: root/bridge/mattermost/mattermost.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/mattermost/mattermost.go')
-rw-r--r--bridge/mattermost/mattermost.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index f9e350e8..bedd07a8 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -163,6 +163,9 @@ func (b *Bmattermost) Send(msg config.Message) (string, error) {
matterMessage.UserName = nick
matterMessage.Type = ""
matterMessage.Text = message
+ matterMessage.Text = message
+ matterMessage.Props = make(map[string]interface{})
+ matterMessage.Props["matterbridge"] = true
err := b.mh.Send(matterMessage)
if err != nil {
flog.Info(err)
@@ -226,6 +229,10 @@ func (b *Bmattermost) handleMatterClient(mchan chan *MMMessage) {
props := message.Post.Props
if props != nil {
+ if _, ok := props["matterbridge"].(bool); ok {
+ flog.Debugf("sent by matterbridge, ignoring")
+ continue
+ }
if _, ok := props["override_username"].(string); ok {
message.Username = props["override_username"].(string)
}