diff options
author | Wim <wim@42.be> | 2018-03-06 21:34:55 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-03-06 21:35:47 +0100 |
commit | e5989adf92cd5ea007b5e7d50580579f8581fee2 (patch) | |
tree | 30592393820ff17d2e8f3cc9551cf83ce7d5f3e6 /bridge/slack/slack.go | |
parent | 9e5da2f9d7384f2d17ed3bc18bcca7b7c07e6252 (diff) | |
download | matterbridge-msglm-e5989adf92cd5ea007b5e7d50580579f8581fee2.tar.gz matterbridge-msglm-e5989adf92cd5ea007b5e7d50580579f8581fee2.tar.bz2 matterbridge-msglm-e5989adf92cd5ea007b5e7d50580579f8581fee2.zip |
Add support for NoSendJoinPart. Closes #382
Diffstat (limited to 'bridge/slack/slack.go')
-rw-r--r-- | bridge/slack/slack.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index a42c7e78..7912988e 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -619,6 +619,10 @@ func (b *Bslack) sendWebhook(msg config.Message) (string, error) { // skipMessageEvent skips event that need to be skipped :-) func (b *Bslack) skipMessageEvent(ev *slack.MessageEvent) bool { + if ev.SubType == "channel_leave" || ev.SubType == "channel_join" { + return b.GetBool("nosendjoinpart") + } + // ignore pinned items if ev.SubType == "pinned_item" || ev.SubType == "unpinned_item" { return true |