Summary
I’d like to propose an enhancement to Flarum’s built-in Flags system (flarum/flags) that would allow users to choose specific moderators to receive a report instead of automatically notifying all moderators.
The goal is to give communities finer control over how reports are routed, especially for large forums or communities with specialized moderation teams.
Current Situation
Right now, when a user flags a post or discussion using Flarum’s built-in flarum/flags extension, the report is visible to every moderator. While that’s fine for smaller communities, it can be inefficient or even problematic for larger ones. For example:
- Large moderation teams: Not every moderator needs to handle every type of report, which can cause notification overload or confusion.
- Topic-specific moderators: Some moderators may only manage certain tags, categories, or topics.
- Privacy or sensitivity concerns: Certain reports (e.g., harassment, legal issues) may need to go to a trusted subset of moderators only.
Proposed Solution
An extension that adds selective moderator reporting — allowing reports to be directed to specific moderators or moderator groups. This extension would extend the Flags system with an additional option allowing users (or the system) to choose which moderators a report is sent to.
Key Features
- Moderator selection UI when flagging a post:
- Dropdown or multi-select box showing available moderators (possibly pre-filtered based on tags or user groups).

$discussion->recipientUsers()->syncWithoutDetaching([$moderator->id]);
Example Use Cases
- A forum with multiple topic-specific moderator teams. E.g. a forum with separate “Tech Support” and “Community Conduct” moderators — flags about technical issues go to tech staff, while conduct issues go to community moderators.
- Private or sensitive areas where reports should only be visible to certain moderators.
- Multilingual forums where users can choose moderators who speak their language.
Why This Would Be Useful
- More efficient moderation — reports reach the right people faster.
- Reduced noise — fewer unnecessary notifications for moderators not involved.
- Improved privacy and trust — users can direct sensitive issues to trusted moderators.
Implementation Notes (Preliminary)
- Extend
flarum/flags models and permissions to include a target_moderators relation.
- Modify the flag creation modal (frontend) to include moderator selection.
- Filter the Flags page for moderators so that only flags assigned to them (or to their group) are shown.
- Include admin settings for configuration behavior (manual vs. automatic assignment).
1. Frontend (JavaScript)
- Extend the modal dialog for Flag Report
// JS – extend the report modal
import { extend } from 'flarum/common/extend';
import ReportPostModal from 'flarum/flags/components/ReportPostModal';
import app from 'flarum/common/app';
import Stream from 'flarum/common/utils/Stream';
extend(ReportPostModal.prototype, 'fields', function (fields) {
// List of moderators (could be fetched via API)
const moderators = app.store.all('users').filter(u => u.groups().some(g => g.nameSingular() === 'Moderator'));
const selectedModerator = Stream(null);
fields.add('assignedModerator', (
<div className="Form-group">
<label>Choose Moderator</label>
<select className="FormControl" onchange={e => selectedModerator(e.target.value)}>
<option value="">Please choose…</option>
{moderators.map(m => (
<option value={m.id()}>{m.displayName()}</option>
))}
</select>
</div>
));
// Add when sending:
this.assignedModerator = selectedModerator;
});
extend(ReportPostModal.prototype, 'onsubmit', function () {
this.attrs.assignedModerator = this.assignedModerator();
});
2. Backend (PHP)
- Configure the Report-Handler to recieve the
assigned_moderator_id from the Request-Payload
- Store the Report in the Database
- Send the Notification only to the selected Moderator(s)
use Flarum\Flags\Event\Created;
use Flarum\User\User;
use Illuminate\Events\Dispatcher;
return function (Dispatcher $events) {
$events->listen(Created::class, function (Created $event) {
$flag = $event->flag;
$assignedModeratorId = $flag->attributes['assigned_moderator_id'] ?? null;
if ($assignedModeratorId) {
$moderator = User::find($assignedModeratorId);
if ($moderator) {
// Option 1: Just send Notification
$moderator->notify(new \Flarum\Notification\Blueprints\CustomFlagNotification($flag));
// Option 2 (optional): Add Moderator as participant (Byobu)
// $flag->post->discussion->recipientUsers()->syncWithoutDetaching([$moderator->id]);
}
}
});
};
Feedback Wanted
I think this could be a really valuable improvement for communities with complex moderation structures. I’d love to hear feedback from the community about:
- Whether this feature would be useful for your forum setup.
- How you’d prefer moderator selection to work (user choice vs. automatic assignment).
- Any privacy, UX, or technical considerations that should be kept in mind.
- Any potential issues or alternative ideas for implementing it.
If there’s enough interest, maybe this could inspire an extension developer to take it on!
@huseyinfiliz I know, you are well versed with the Notification system ;-)