diff options
author | Wim <wim@42.be> | 2018-02-03 01:15:57 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-02-03 01:15:57 +0100 |
commit | 0bcd1e62f3125676d10bac2bcfc08a3ef00eb10b (patch) | |
tree | ad2173d95637641054eeadc33620ab202825ca9f /bridge | |
parent | 80822b7fff85647ad5852b00ec36d046959aed92 (diff) | |
download | matterbridge-msglm-0bcd1e62f3125676d10bac2bcfc08a3ef00eb10b.tar.gz matterbridge-msglm-0bcd1e62f3125676d10bac2bcfc08a3ef00eb10b.tar.bz2 matterbridge-msglm-0bcd1e62f3125676d10bac2bcfc08a3ef00eb10b.zip |
Add channel_purpose to ShowTopicChange. Ignore (un)pinned_item (slack). #353
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/slack/slack.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 8e5e2606..1aca7629 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -304,7 +304,7 @@ 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 } @@ -342,6 +342,9 @@ 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" { |