Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the ability to nuke all comments of a post #5

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ni5arga
Copy link

@ni5arga ni5arga commented Mar 3, 2024

Added the ability to remove & lock all comments of a post by introducing the handleNukePost function.

handleNukePost allows a moderator to lock or remove all comments in a post. It fetches a post using the provided post ID, checks if the current user has the necessary mod permissions, and then proceeds to lock or remove all comments in the post based on the provided properties. If the skipDistinguished property is true, distinguished comments are skipped. The function logs any failed attempts to lock or remove comments and returns a success message along with the number of comments handled.

Also added a separate form - nukePostForm in main.ts for this purpose.

@cedaraspen
Copy link
Collaborator

Thanks for adding this! We're setting up some plumbing to be able to accept this PR and publish it into the official app automatically. We'll give an update / merge it in as soon as that's fixed.

@ni5arga
Copy link
Author

ni5arga commented Mar 11, 2024

That's cool, thanks for letting me know!

@ni5arga ni5arga reopened this Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants