From 43bd779fb7f8d9d19bec8bfd98dd4a5c29a1f76a Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 27 Aug 2017 00:00:02 +0200 Subject: Handle leave/join events (slack). Closes #246 --- bridge/slack/slack.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bridge/slack/slack.go') diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index f16aa055..f2663029 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -237,6 +237,10 @@ func (b *Bslack) handleSlack() { if message.Raw.SubType == "me_message" { msg.Event = config.EVENT_USER_ACTION } + if message.Raw.SubType == "channel_leave" || message.Raw.SubType == "channel_join" { + msg.Username = "system" + msg.Event = config.EVENT_JOIN_LEAVE + } b.Remote <- msg } } -- cgit v1.2.3