Thumbnail

rani/matterbridge.git

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

commit 7a8cabe28433a4ae0ea735e2ae68932769b70687 Author: Wim <wim@42.be> Date: Tue Jul 25 23:19:50 2017 +0000 Ignore edited messages with reactions (mattermost) diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go index 99e8d60..67dc7b5 100644 --- a/bridge/mattermost/mattermost.go +++ b/bridge/mattermost/mattermost.go @@ -1746 +17410 @@ 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