Area: mobieusHelp (audit p7) · Surface: platform/src/Services/Helpdesk/NotificationPrefs.php · Dimension: dead-code · Severity: minor
NotificationPrefs offers three send-gate helpers: shouldSend (generic), shouldSendToRequester (used in mailer), and shouldSendToAgent. The mailer never gates agent notifications through shouldSendToAgent — meaning agent-side notification preferences (the agent CHANNEL/event opt-out) are likely never honored on the send path. The wrapper is unreferenced.
Evidence
Definition at platform/src/Services/Helpdesk/NotificationPrefs.php:58 `public static function shouldSendToAgent(int $agentId, string $eventKey, string $channel = self::CHANNEL_EMAIL): bool`. Whole-repo grep: `grep -rn "shouldSendToAgent" /home/patrick/mobieus-io --include='*.php' | grep -v "function shouldSendToAgent"` => 0. The two siblings ARE used by HelpdeskMailer.php: shouldSend() and shouldSendToRequester() both appear in platform/src/Services/Helpdesk/HelpdeskMailer.php. Only the agent-scoped wrapper is dead.
Suggested fix. Either wire shouldSendToAgent() into HelpdeskMailer where agent recipients are notified (so agent notification prefs are actually respected), or remove it as dead code. Recommend the former — its absence is a latent functional gap, not just dead code.
Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.
Patrick Bass
@mobieus