Send GetChannelMembers event only to slack for now

This commit is contained in:
Wim 2019-01-24 22:46:05 +01:00
parent 94812d8648
commit 707db950c8

View File

@ -142,6 +142,10 @@ func (r *Router) updateChannelMembers() {
for { for {
for _, gw := range r.Gateways { for _, gw := range r.Gateways {
for _, br := range gw.Bridges { for _, br := range gw.Bridges {
// only for slack now
if br.Protocol != "slack" {
continue
}
flog.Debugf("sending %s to %s", config.EventGetChannelMembers, br.Account) flog.Debugf("sending %s to %s", config.EventGetChannelMembers, br.Account)
if _, err := br.Send(config.Message{Event: config.EventGetChannelMembers}); err != nil { if _, err := br.Send(config.Message{Event: config.EventGetChannelMembers}); err != nil {
flog.Errorf("updateChannelMembers: %s", err) flog.Errorf("updateChannelMembers: %s", err)