Skip to content

Comments

Prepare for ActionMailbox#9108

Open
gbp wants to merge 9 commits intodevelopfrom
add-action-mailbox-prep
Open

Prepare for ActionMailbox#9108
gbp wants to merge 9 commits intodevelopfrom
add-action-mailbox-prep

Conversation

@gbp
Copy link
Member

@gbp gbp commented Feb 2, 2026

Relevant issue(s)

Work to support #8801

What does this do?

Refactors mail ingress so responses can be received from any source.

Why was this needed?

Requests used to be able to limiting responses received via ./script/mailin or the POP poller. This source criteria makes adding ActionMailbox integration harder (ie. we would need to patches). Luckily we are be able to remove the source limits without issue as we already check is a response has been received before adding it to a request.

@gbp gbp force-pushed the add-action-mailbox-prep branch from 0184c9f to 975a78c Compare February 2, 2026 15:55
gbp added 9 commits February 3, 2026 09:39
Simplify with guard clauses, replacing nested conditionals to reduce
nesting depth and improve readability.
Allow mail from any source. De-duplication based on the message ID is
already done by `InfoRequest#already_received?`.

This change will make it easier to add support for ActionMailbox.
Now that mail source restriction have been dropped, the source argument
threaded through RequestMailer.receive -> InfoRequest#receive.

Clean up the dead parameter and its defaults.
This used to be assigned to Pro subscribers (and never removed if they
unsubscribed). It was used when receiving inbound mails to allow emails
delivered via the POP poller.

Mail source restrictions have been removed so this feature can go too.
Retrieve the raw email source directly from the Mail object instead of
using the inbound_email argument. The inbound_email value is threaded
through multiple method calls, so relying on the Mail instance allows
this parameter to be removed over time and simplifies the call chain.
The inbound_email was threaded through RequestMailer#receive ->
InfoRequest#receive -> ResponseRejection but isn't used anymore beyond
the initial parse into a Mail object.

Remove it from every signature and call site.
Replace the generic *args / defaults hash pattern with explicit keyword
arguments.
Change helper method so it doesn't return inbound_email anymore and
combine with the actual call to receive the mail.
@gbp gbp force-pushed the add-action-mailbox-prep branch from 975a78c to f524af8 Compare February 3, 2026 09:39
@gbp gbp added the on-staging label Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant