summaryrefslogtreecommitdiffstats
path: root/bridge/mattermost
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-07-25 23:19:50 +0200
committerWim <wim@42.be>2017-07-25 23:19:50 +0200
commitba653c08413ed16192acab1121da47d09d7cc43e (patch)
treed4f1817bd84e576fefa09abeb1cef51ed828c57c /bridge/mattermost
parent5b191f78a0c3d1733d9c425ff4351e1e28e401aa (diff)
downloadmatterbridge-msglm-ba653c08413ed16192acab1121da47d09d7cc43e.tar.gz
matterbridge-msglm-ba653c08413ed16192acab1121da47d09d7cc43e.tar.bz2
matterbridge-msglm-ba653c08413ed16192acab1121da47d09d7cc43e.zip
Ignore edited messages with reactions (mattermost)
Diffstat (limited to 'bridge/mattermost')
-rw-r--r--bridge/mattermost/mattermost.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index 99e8d60c..67dc7b5b 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -174,6 +174,10 @@ func (b *Bmattermost) handleMatterClient(mchan chan *MMMessage) {
// only listen to message from our team
if (message.Raw.Event == "posted" || message.Raw.Event == "post_edited") &&
b.mc.User.Username != message.Username && message.Raw.Data["team_id"].(string) == b.TeamId {
+ // if the message has reactions don't repost it (for now, until we can correlate reaction with message)
+ if message.Post.HasReactions {
+ continue
+ }
flog.Debugf("Receiving from matterclient %#v", message)
m := &MMMessage{}
m.UserID = message.UserID