mirror of
https://github.com/pischule/go-mention-all-bot.git
synced 2025-12-19 06:56:43 +00:00
Fix npe
This commit is contained in:
2
main.go
2
main.go
@@ -135,7 +135,7 @@ func handleStats(c tele.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handleUserLeft(c tele.Context) error {
|
func handleUserLeft(c tele.Context) error {
|
||||||
u := ChatUser{UserID: c.Callback().Message.UserLeft.ID, ChatID: c.Chat().ID}
|
u := ChatUser{UserID: c.Message().UserLeft.ID, ChatID: c.Chat().ID}
|
||||||
log.Printf("user %d left chat %d", u.UserID, u.ChatID)
|
log.Printf("user %d left chat %d", u.UserID, u.ChatID)
|
||||||
DB.Where(&u).Delete(&ChatUser{})
|
DB.Where(&u).Delete(&ChatUser{})
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user