Ethsim2
(Ethan )
September 11, 2026, 6:43pm
50
I found that adding logged_in_users to the site setting: skip review media groups ensures newly-created staged users post automatically to a topic rather than to the review queue.
I’ve also opened a test-only PR to confirm that the current behaviour where staged users match logged_in_users for this check is intentional, and therefore something that can be relied on without regressing in future:
main ← Ethsim12:dev-staged-email-media-exemption
drafted 04:56PM - 11 Sep 26 UTC
This adds regression coverage for media-containing incoming email from a newly-c… reated staged user when `logged_in_users` is included in `skip_review_media_groups`.
This came up in Meta topic 412025 following the staged-email media handling covered by #42515.
The new spec verifies that:
- a previously unknown sender is created as a staged user;
- their media-containing email creates a topic directly when `logged_in_users` is configured to skip media review; and
- no `ReviewableQueuedPost` is created.
This complements the existing test which verifies that the same kind of staged email is queued with `contains_media` when the sender is not in an exempt group.
No production code is changed.
One slightly surprising aspect of the current behavior is that staged users match the `logged_in_users` pseudo-group for this check. This PR makes that dependency explicit for review and regression coverage.
Tests:
- `bin/rspec spec/lib/email/receiver_spec.rb` — 213 examples, 0 failures
- `bin/rubocop spec/lib/email/receiver_spec.rb` — no offenses
- `git diff --check`