Would a contact/inquiry queue belong in core, or should it stay a plugin?
Before writing any code, I'd like to ask whether this is something you'd want in core.
The need. Forums often need a way for users to reach the staff without starting a public topic or a chat with a specific person. Typical requests are account problems, reports that don't fit a post or user flag, or contacting the site from a guest session. Right now this means an external form or a plugin. I maintain one, nodebb-plugin-simple-contact.
What it would look like. It would work like flags, but for requests that come from users instead of reports about content:
- Two new global privileges,
inquiry:createandinquiry:manage. Takinginquiry:createaway from guests turns off guest submissions. - An ACP form builder with admin-defined fields. It would use the same field types and value handling as custom user fields.
- A handler queue that works like
/flags: states (the same four as flags), assignee, internal notes, and history. - Replies to the submitter by notification and/or email. Guests who left an address would get email through
sendToEmail, and the email would contain only the staff reply, not the original submission. - No built-in captcha. Instead there would be a
filter:inquiries.checkhook and a form-entry array, the same way registration handles captcha.
What's already in place. Most of the groundwork has already landed as standalone changes: notification merging for new types (#14843), the shared rate limit and client IP helpers (#14868, #14844), sendToEmail defaults and the email.cancel gate (#14863, #14873), and the custom field helpers (#14853, #14860, #14862). Still open: a generic merged-notification text (#14886), consistent rules for who handles a flag (#14888–#14890), and admin route mapping from plugins (#14891).
Size. In core, I estimate about 3.5–4k lines across ~40 files. About half of that is tests and OpenAPI. The rest is a new src/inquiries.js, write API routes, three pages, an ACP page, an upgrade script for the privileges, and a small change to the harmony user menu.
The question. Would you consider this for core, and if so, in what shape? If you'd rather keep it as a plugin, that's a fine answer too. The plugin already works, and #14891 would let it put its ACP page under the right privilege. I'd just rather ask now than send a 4k-line PR you didn't want.
Source: NodeBB/NodeBB