feat: Allow communities to request approval for not-spam#3595
Merged
Conversation
…s the application
…m community management
…ner and CommunityCreate components
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.
Replaces the passive "we'll review your community within 5 days" model with an explicit Request Approval flow. Community admins now decide when they're ready for their community to be reviewed, and actively request it via a dialog. Also replaces the broken infinite scroll on the superadmin spam dashboard with proper pagination.
Motivation
What changed
New "Request Approval" flow
help@pubpub.orgwith community details, requester info, spam score, and a link to the superadmin dashboard.Superadmin dashboard
Database
2026_04_21_addReviewRequestToSpamTag.js): AddsapprovalRequestedAt,approvalRequestMessage,approvalRequestedByUserIdcolumns to SpamTag.POST /api/spamTags/requestCommunityReview— validates the user is a community admin, records the request, and fires notifications.Copy updates
Files changed (19 files)
client/containers/App/SpamBanner.tsx,spamBanner.scss,App.tsxclient/containers/CommunityCreate/CommunityCreate.tsxCommunitySpam.tsx,CommunitySpamEntry.tsx,useSpamCommunities.ts,filters.ts,communitySpam.scss,communitySpamEntry.scssserver/spamTag/api.ts,server/spamTag/communityDashboard.ts,server/spamTag/model.tsserver/routes/superAdminDashboard.tsxserver/utils/email/communitySpam.ts,server/community/queries.tstools/migrations/2026_04_21_addReviewRequestToSpamTag.jstypes/spam.tsserver/community/__tests__/api.test.tsEmail behavior (current state)
help@pubpub.orgMigration notes
Run the migration
2026_04_21_addReviewRequestToSpamTag.jsto add the three new columns to SpamTag. All columns are nullable — no data backfill needed.