From c3bdebdda12e85ca19301218b5683eca70ab9239 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 10 Aug 2024 14:21:13 +0200 Subject: [PATCH] fix: actually skip pinned --- blurp.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/blurp.go b/blurp.go index aad3e20..53e7631 100644 --- a/blurp.go +++ b/blurp.go @@ -186,6 +186,11 @@ var deleteCmd = &cobra.Command{ continue } + if status.Pinned && skipPinned { + slog.Info(fmt.Sprintf("skipping %s (skip pinned: %v)", status.ID, skipPinned)) + continue + } + numHours := time.Duration(168 * weeks) if t.Before(time.Now().Add(-time.Hour * numHours)) { if !dry { @@ -284,11 +289,6 @@ func readAllPaged(authClient *auth.Client, accID string) ([]*models.Status, erro } params := &accounts.AccountStatusesParams{ID: accID, MaxID: maxID} - if skipPinned { - includePins := false - params.Pinned = &includePins - } - resp, err := authClient.Client.Accounts.AccountStatuses(params, authClient.Auth) if err != nil { slog.Error("error fetching page", "error", err)