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