mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-12-24 18:25:40 +00:00
Suppress unhandled HelloEvent message (slack) (#913)
This commit is contained in:
parent
ba6759010b
commit
1d708ab351
@ -43,7 +43,7 @@ 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) {
|
||||
@ -86,7 +86,7 @@ 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)
|
||||
|
@ -12,7 +12,7 @@ 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"
|
||||
)
|
||||
@ -36,6 +36,7 @@ type Bslack struct {
|
||||
}
|
||||
|
||||
const (
|
||||
sHello = "hello"
|
||||
sChannelJoin = "channel_join"
|
||||
sChannelLeave = "channel_leave"
|
||||
sChannelJoined = "channel_joined"
|
||||
|
Loading…
Reference in New Issue
Block a user