Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Allow deleting likes and reskeets #1

Open
ghost opened this issue Oct 23, 2023 · 4 comments
Open

Allow deleting likes and reskeets #1

ghost opened this issue Oct 23, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Oct 23, 2023

Would you ever consider adding an option to schedule likes to be automatically deleted in the same way? I absolutely love your site!!!

@matlfb
Copy link

matlfb commented Oct 26, 2023

I'd love to see the ability to automatically delete reskeets too !

@pojntfx pojntfx self-assigned this Oct 26, 2023
@pojntfx pojntfx added the enhancement New feature or request label Oct 26, 2023
@pojntfx pojntfx changed the title feature request Allow deleting likes and reskeets Oct 26, 2023
@pojntfx
Copy link
Owner

pojntfx commented Oct 26, 2023

Hi! First of all, thanks!

As for the feature request: This is definitely doable.

We currently get the list of posts to be deleted here: https://github.com/pojntfx/skysweeper/blob/main/pkg/bluesky/deletion.go#L39-L126
And then we delete it in bulk here: https://github.com/pojntfx/skysweeper/blob/main/pkg/bluesky/deletion.go#L128-L187

So in order for this to work, we'd have to do these things:

  • Add an API client for getting a user's likes with cursor support
  • Add an API client for getting a user's reskeets with cursor support
  • Add an API client for deleting a user's likes with cursor support
  • Add an API client for deleting a user's reskeets with cursor support
  • Extend the DB config schema for two false by default options for deleting likes and reskeets
  • Extend the DB config schema with cursors for reskeets & likes
  • Add those two params to the API update config endpoint
  • Add those two options to the frontend
  • For every sweep where we delete skeets, we check if the user has enabled these features, and get & delete likes and reskeets

Def. doable :)

@ericvolp12
Copy link

ericvolp12 commented Nov 16, 2023

Hey, just wanted to start by saying this project is awesome and I love it!
I was building something similar recently and learned about this today, so wanted to check it out!

If you need to get likes/reskeets/skeets, you can grab the whole repo and then filter based on NSID of the records which may be more efficient than using the listRecords repeatedly. I took this approach in my cleanup tool which is also in Go and you can read the code for that bit here.

Should prevent having to talk to the API more than once to get a list of records to delete for a given user and a given sweep, should also include all records in their repo which would allow for deletion of more record types as desired.

Hope that helps for anyone who takes on this issue!

@pojntfx
Copy link
Owner

pojntfx commented Nov 18, 2023

Thanks! I appreciate that API endpoint - that should def. be useful as long as I can get the cursors to work ^^

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants