fix: watch chat check

This commit is contained in:
krau
2025-08-03 17:04:26 +08:00
parent 133453b5d4
commit 0c16650ea5
3 changed files with 6 additions and 3 deletions

View File

@@ -113,7 +113,7 @@ func Login(ctx context.Context) (*gotgproto.Client, error) {
uc.Dispatcher.AddHandler(handlers.NewMessage(filters.Message.Media, func(ctx *ext.Context, u *ext.Update) error {
chatId := u.EffectiveChat().GetID()
watchChats, err := database.GetWatchChatsByChatID(ctx, chatId)
if err != nil || watchChats == nil {
if err != nil || len(watchChats) == 0 {
return dispatcher.EndGroups
}
return dispatcher.ContinueGroups