Repository navigation
Report Remotes messages and people to moderators - #1518
Open
shanerbaner82 wants to merge 1 commit into
Open
shanerbaner82 wants to merge 1 commit into
shanerbaner82 wants to merge 1 commit into
Conversation
Adds POST remotes/messages/{message}/reports and POST users/{user}/reports
for the mobile app, alongside commit reports, and a Messages & people
moderation tab where admins see open reports and dismiss them.
1 task
Contributor
Author
|
The mobile app side is NativePHP/dev-null-app#173. |
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.
Summary
Apple rejected the /dev/null iOS app under App Store Review Guideline 1.2, which requires apps with user-generated content to let people report objectionable content and abusive users. Commits could already be reported. Remotes messages and people could not. This PR adds API endpoints for reporting both, plus a moderation tab where admins review and dismiss those reports. The mobile app PR NativePHP/dev-null-app uses these endpoints (linked below).
cc @nunomaduro @simonhamp
Changes
POST api/v1/remotes/messages/{message}/reports(api-message-report.store) andPOST api/v1/users/{user:handle}/reports(api-user-report.store).{reason, details?}, using the same reasons as commit reports. Response:204.own_message, and reporting yourself returns 403own_profile.reportsrate limit of 5 per minute per user.message_reportsanduser_reportstables, models and factories, mirroringcommit_reports.reporter_idis never serialized.CreateMessageReport,CreateUserReport,UpdateMessageReportDismissedAtandUpdateUserReportDismissedAt. They notify admins withUsersUpdated(..., Moderation), which carries ids only.moderation/people-reports). It lists open reports with the reported message's text or the reported person, each linked to the profile where timeout and ban already live, with a Dismiss button.CreateExportincludes the reports a user filed, andschema_versiongoes from 8 to 9.KNOWLEDGE_BASE.mdhas a new user-facing section, "Reporting messages and people".Not included: AI moderation of messages before they are sent. Commits already go through
ModerationProvider. Doing the same for Remotes would send private, encrypted-at-rest DMs to OpenAI, which the data guidelines push against, so I left it out on purpose. For direct messages, reporting plus the existing blocking covers 1.2. This is open for discussion if you want it.Validation
All of these were run locally on PHP 8.5 with Postgres 17. CI has not run yet.
pest --parallel --ci --coverage --exactly=100.0: 5887/5887 passed, 100.0% coverage. This used Herd's xdebug, and the web tests ran with a temporarypublic/hot, because the local Vite build was missing.bun run test:lint: passed, with warnings only.bun run test:types: passed.bun run test:unit: 308 passed.Independent review
A separate reviewer agent did a read-only review of the staged diff on base
af8dc37a. It checked the change against.ai/guidelinesand the existing commit-report implementation. Verdict: correctness, regressions, architecture and tests all PASS. It found no authorization holes and no leaks to non-admins. Its non-blocking notes are listed under Limitations.Limitations
ReportedUserController,ReportedUsersQueryandreported-user.indexserve both message and user reports. They could be split into separate message and user versions.