class WebhookController implements RequestHandlerInterface
Receives inbound delivery-event webhooks (bounces, complaints) from the active mail driver's provider, verifies them, and dispatches the corresponding Flarum event so listeners can react.
Methods
No description
No description
No description
Build the Symfony HttpFoundation request the driver's parser expects, preserving the method, headers and raw body needed for signature verification. Avoids pulling in the PSR-7 <-> Symfony bridge dependency.
The raw request body as a JSON string. Reads the body stream directly, but falls back to re-encoding the already-parsed body if an upstream middleware has consumed the (non-rewindable) stream first — which is what happens inside Flarum's middleware stack.
Details
at
line 40
__construct( MailWebhooks $webhooks, SettingsRepositoryInterface $settings, UserRepository $users, Dispatcher $events, LoggerInterface $logger, ConnectionInterface $database, Repository $cache)
at
line 51
ResponseInterface
handle( ServerRequestInterface $request)
at
line 102
protected ResponseInterface
refuse( ServerRequestInterface $request, int $status, string $reason)
at
line 117
protected void
handleEvent( HandlesWebhooks $driver, object $event)
at
line 149
protected Collection
recipients(string $email)
at
line 154
protected void
dispatchOnce( HandlesWebhooks $driver, MailerDeliveryEvent| MailerEngagementEvent $remote, EmailBounced| EmailComplained $event)
at
line 176
protected Request
toSymfonyRequest( ServerRequestInterface $request)
Build the Symfony HttpFoundation request the driver's parser expects, preserving the method, headers and raw body needed for signature verification. Avoids pulling in the PSR-7 <-> Symfony bridge dependency.
at
line 229
protected string
rawBody( ServerRequestInterface $request)
The raw request body as a JSON string. Reads the body stream directly, but falls back to re-encoding the already-parsed body if an upstream middleware has consumed the (non-rewindable) stream first — which is what happens inside Flarum's middleware stack.