Add nil check for group update (telegram) (#2036)

pull/2056/head
Joseph Mansy 1 year ago committed by GitHub
parent 5bbe422161
commit 574f25337d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -264,8 +264,7 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
}
func (b *Btelegram) handleGroupUpdate(update tgbotapi.Update) {
msg := update.Message
if msg := update.Message; msg != nil {
switch {
case msg.NewChatMembers != nil:
b.handleUserJoin(update)
@ -273,6 +272,7 @@ func (b *Btelegram) handleGroupUpdate(update tgbotapi.Update) {
b.handleUserLeave(update)
}
}
}
func (b *Btelegram) handleUserJoin(update tgbotapi.Update) {
msg := update.Message

Loading…
Cancel
Save