mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-22 03:49:25 +01:00
Add nil check for group update (telegram) (#2036)
This commit is contained in:
parent
5bbe422161
commit
574f25337d
@ -264,13 +264,13 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
|
||||
}
|
||||
|
||||
func (b *Btelegram) handleGroupUpdate(update tgbotapi.Update) {
|
||||
msg := update.Message
|
||||
|
||||
switch {
|
||||
case msg.NewChatMembers != nil:
|
||||
b.handleUserJoin(update)
|
||||
case msg.LeftChatMember != nil:
|
||||
b.handleUserLeave(update)
|
||||
if msg := update.Message; msg != nil {
|
||||
switch {
|
||||
case msg.NewChatMembers != nil:
|
||||
b.handleUserJoin(update)
|
||||
case msg.LeftChatMember != nil:
|
||||
b.handleUserLeave(update)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user