mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-22 02:32:02 -08:00
Send first message after connect (slack). Closes #252
This commit is contained in:
parent
01badde21d
commit
a3470f8aec
@ -257,12 +257,9 @@ func (b *Bslack) handleSlack() {
|
||||
}
|
||||
|
||||
func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
||||
count := 0
|
||||
for msg := range b.rtm.IncomingEvents {
|
||||
switch ev := msg.Data.(type) {
|
||||
case *slack.MessageEvent:
|
||||
// ignore first message
|
||||
if count > 0 {
|
||||
flog.Debugf("Receiving from slackclient %#v", ev)
|
||||
if len(ev.Attachments) > 0 {
|
||||
// skip messages we made ourselves
|
||||
@ -314,8 +311,6 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
||||
}
|
||||
}
|
||||
mchan <- m
|
||||
}
|
||||
count++
|
||||
case *slack.OutgoingErrorEvent:
|
||||
flog.Debugf("%#v", ev.Error())
|
||||
case *slack.ChannelJoinedEvent:
|
||||
|
Loading…
Reference in New Issue
Block a user