diff --git a/internal/adapter/safew.go b/internal/adapter/safew.go index f5c41a8..0660f6d 100644 --- a/internal/adapter/safew.go +++ b/internal/adapter/safew.go @@ -178,7 +178,9 @@ func (s *SafeWSender) PollGroupChats(token string, offset int64, timeout int) ([ if maxID > 0 { next = maxID + 1 } - slog.Info("safew getUpdates", "timeout", timeout, "updates", n, "groups", len(chats), "offset", next) + if n > 0 { + slog.Info("safew getUpdates", "timeout", timeout, "updates", n, "groups", len(chats), "offset", next) + } return chats, next, nil } diff --git a/internal/safew/watcher.go b/internal/safew/watcher.go index 6672c07..075230a 100644 --- a/internal/safew/watcher.go +++ b/internal/safew/watcher.go @@ -196,7 +196,9 @@ func (w *Watcher) pollOnce(ctx context.Context, token string, timeout int) error if err != nil { return err } - slog.Info("safew poll", "timeout", timeout, "groups", len(chats), "offset", next) + if len(chats) > 0 { + slog.Info("safew poll", "timeout", timeout, "groups", len(chats), "offset", next) + } if err := w.mergeAndLog(ctx, token, chats); err != nil { return err }