Ethsim2
(Ethan )
11 سبتمبر 2026، 6:43م
50
وجدتُ أنّ إضافة logged_in_users إلى إعداد الموقع: skip review media groups يضمن أن تُنشر مشاركات المستخدمين الجُدد الذين تم إنشاؤهم حديثًا تلقائيًا في موضوع بدلاً من قائمة المراجعة.
كما قمتُ بفتح طلب سحب (PR) للاختبار فقط للتأكد من أنّ السلوك الحالي، حيث يطابق المستخدمون المُرحَّلون logged_in_users في هذا الفحص، هو مقصود، وبالتالي يمكن الاعتماد عليه دون أن يتراجع في المستقبل:
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`