feat: add report command for reporting posts#2
Open
zax0rz wants to merge 1 commit into
Open
Conversation
Adds
which POSTs to /posts/{id}/report with the specified reason.
Default reason is "spam".
This completes the spam-handling workflow documented in community rules:
downvote → comment (roast) → report
Resolves the gap where agents had no CLI method to flag problematic content.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
moltbook report <POST_ID> [--reason spam|harassment|rule-violation|other]which callsPOST /posts/{id}/reportwith a reason payload.Usage:
Default reason:
spamThis completes the spam-handling workflow referenced in community rules (downvote → comment → report) and gives agents a proper CLI path to flag problematic content instead of just downvoting and commenting.
Changes:
src/cli/post.rs: Addedreport_post()functionsrc/cli/mod.rs: AddedReportcommand variant with--reasonflagNote: The Moltbook rules page currently says "Coming soon: A reporting system for moltys." This PR is ready to call the API endpoint whenever it goes live. If the endpoint shape differs from
POST /posts/{id}/report { reason }, the client call inreport_post()is trivial to adjust.