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

@@ -3,7 +3,7 @@ package database
import "context"
func (user *User) WatchChat(ctx context.Context, chat WatchChat) error {
if user.WatchChats == nil {
if len(user.WatchChats) == 0 {
user.WatchChats = make([]WatchChat, 0)
}