This commit is contained in:
2023-06-13 01:14:52 +03:00
parent 4b9a78549c
commit b4bb381853

View File

@@ -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