summaryrefslogtreecommitdiffstats
path: root/bridge/telegram
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/telegram')
-rw-r--r--bridge/telegram/handlers.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go
index efafa9d6..8e7dc7ba 100644
--- a/bridge/telegram/handlers.go
+++ b/bridge/telegram/handlers.go
@@ -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)
+ }
}
}