feat(review): automatic per-status messages to the applicant#215
Merged
Conversation
Send an automatic message to the applicant when a submission enters a status,
with a different message per status, editable per change, and overridable per
form.
- Guild-wide templates: new Guild.statusMessages map { statusKey: message }
(+ migration), edited on a new manager-only "Messages" tab that lists every
status (built-in + custom).
- Per-form override: Form.settings.statusMessages (no schema change), edited in
the form builder; overrides the guild template for that form.
- Applied in the shared changeSubmissionStatus chokepoint, so it covers web
review, bulk actions, the bot's Accept/Reject buttons and automations: a
public status change resolves the template (form -> guild) and records it as a
message event + applicant DM. A resolved message supersedes the generic
status-change DM (one meaningful notification); hidden changes stay silent.
- At-change override: the review panel prefills the target status' template into
an editable box; send it as-is, edit it, or clear it to send no message
(status action gained an optional `message`).
Shared resolveStatusMessage/parseStatusMessages (+ tests). Localized in all 7
languages. Typecheck, lint, tests (shared 186) and build green.
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.
Feature request: send an automatic preset (or custom) message when a submission's status changes, a different message per status, overridable with a custom one, and optional per-form overrides.
What it does
Guild.statusMessages.Form.settings.statusMessages).changeSubmissionStatus, so it also fires for bulk status changes, the bot's Accept/Reject buttons and score automations. A public status change records the message as amessageevent (shown on the applicant's status page) and DMs it. A resolved message supersedes the generic "status changed" DM so the applicant gets one meaningful notification; hidden changes stay silent.Implementation
Guild.statusMessagesJSON (+ migration). Per-form lives in the existingForm.settingsJSON (no migration).statusMessagesSchema,parseStatusMessages,resolveStatusMessage(form override -> guild) + tests.PATCH /api/guilds/[guildId]/status-messages; the submission status action gained an optionalmessage.Localized in all 7 languages. Typecheck, lint, tests (shared 186) and build green. Migration applies via the deploy
prisma migrate deploy.Note: per-form overrides are not plan-gated in this version (guild-level presets are the core). Easy to gate later if desired.