commit bde83a2f127a7fef0c94274ef495d879de691272
Author: Qais Patankar <qaisjp@gmail.com>
Date: Thu Oct 03 23:19:50 2019 +0000
diff --git a/bridge/slack/handlers.go b/bridge/slack/handlers.go
index 5a55949..44a57db 100644
--- a/bridge/slack/handlers.go
+++ b/bridge/slack/handlers.go
@@ -437 +437 @@ func (b *Bslack) handleSlack() {
func (b *Bslack) handleSlackClient(messages chan *config.Message) {
for msg := range b.rtm.IncomingEvents {
- if msg.Type != sUserTyping && msg.Type != sLatencyReport {
+ if msg.Type != sUserTyping && msg.Type != sHello && msg.Type != sLatencyReport {
b.Log.Debugf("== Receiving event %#v", msg.Data)
}
switch ev := msg.Data.(type) {
@@ -867 +867 @@ func (b *Bslack) handleSlackClient(messages chan *config.Message) {
b.Log.Errorf("Connection failed %#v %#v", ev.Error(), ev.ErrorObj)
case *slack.MemberJoinedChannelEvent:
b.users.populateUser(ev.User)
- case *slack.LatencyReport:
+ case *slack.HelloEvent, *slack.LatencyReport:
continue
default:
b.Log.Debugf("Unhandled incoming event: %T", ev)
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index 2aaa2cb..94f1302 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -127 +127 @@ import (
"github.com/42wim/matterbridge/bridge/config"
"github.com/42wim/matterbridge/bridge/helper"
"github.com/42wim/matterbridge/matterhook"
- "github.com/hashicorp/golang-lru"
+ lru "github.com/hashicorp/golang-lru"
"github.com/nlopes/slack"
"github.com/rs/xid"
)
@@ -366 +367 @@ type Bslack struct {
}
const (
+ sHello = "hello"
sChannelJoin = "channel_join"
sChannelLeave = "channel_leave"
sChannelJoined = "channel_joined"