fix: actually skip pinned
This commit is contained in:
parent
9383cce16d
commit
c3bdebdda1
10
blurp.go
10
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user