Thumbnail

rani/matterbridge.git

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

commit b4ab42f91f3e5a6a4231e4fbd7fdbea0efc574d2 Author: Wim <wim@42.be> Date: Sat Feb 03 01:15:57 2018 +0000 Add channel_purpose to ShowTopicChange. Ignore (un)pinned_item (slack). #353 diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 8e5e260..1aca762 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -3047 +3047 @@ func (b *Bslack) handleSlack() {   msg.Event = config.EVENT_MSG_DELETE   msg.ID = "slack " + message.Raw.DeletedTimestamp   } - if message.Raw.SubType == "channel_topic" { + if message.Raw.SubType == "channel_topic" || message.Raw.SubType == "channel_purpose" {   msg.Event = config.EVENT_TOPIC_CHANGE   }   @@ -3426 +3429 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {   }   switch ev := msg.Data.(type) {   case *slack.MessageEvent: + if ev.SubType == "pinned_item" || ev.SubType == "unpinned_item" { + continue + }   if len(ev.Attachments) > 0 {   // skip messages we made ourselves   if ev.Attachments[0].CallbackID == "matterbridge" {