Richie
(Richie Rich)
12 سبتمبر 2025، 7:39ص
1
عند حذف مستخدم برفض منشوره الأول، يتم إرسال بريد إلكتروني إليه بعنوان تم حذف حسابك.
هناك خطأ في نص/محتوى البريد الإلكتروني، يبدو أنه يعرض نوعًا من صيغة Ruby hash في الجزء الأوسط من البريد الإلكتروني:
مرحباً،
هذه رسالة آلية من اسم الموقع لإعلامك بأنه تم حذف حساب المستخدم المرتبط بعنوان البريد الإلكتروني هذا بواسطة أحد الموظفين.
{:off_topic=>“تم وضع علامة على منشورك على أنه خارج الموضوع : يشعر المجتمع أنه لا يتناسب مع الموضوع، كما هو محدد حاليًا بالعنوان والمنشور الأول.”, :inappropriate=>“تم وضع علامة على منشورك على أنه غير لائق : يشعر المجتمع أنه مسيء أو مسيء أو سلوك كراهية أو انتهاك لإرشادات مجتمعنا.”, :illegal=>“تم وضع علامة على منشورك على أنه غير قانوني : يعتقد المجتمع أنه قد يكون مخالفًا للقانون.”, :spam=>“تم وضع علامة على منشورك على أنه بريد عشوائي : يشعر المجتمع أنه إعلان، شيء ترويجي بشكل مفرط بدلاً من أن يكون مفيدًا أو ذا صلة بالموضوع كما هو متوقع.”, :notify_moderators=>“تم وضع علامة على منشورك للتنبيه من قبل المشرفين : يشعر المجتمع أن شيئًا ما في المنشور يتطلب تدخلًا يدويًا من قبل أحد الموظفين.”, :responder=>{:off_topic=>“تم وضع علامة على المنشور على أنه خارج الموضوع : يشعر المجتمع أنه لا يتناسب مع الموضوع، كما هو محدد حاليًا بالعنوان والمنشور الأول.”, :inappropriate=>“تم وضع علامة على المنشور على أنه غير لائق : يشعر المجتمع أنه مسيء أو مسيء أو سلوك كراهية أو انتهاك لإرشادات مجتمعنا.”, :spam=>“تم وضع علامة على المنشور على أنه بريد عشوائي : يشعر المجتمع أنه إعلان، شيء ترويجي بشكل مفرط بدلاً من أن يكون مفيدًا أو ذا صلة بالموضوع كما هو متوقع.”, :notify_moderators=>“تم وضع علامة على المنشور للتنبيه من قبل المشرفين : يشعر المجتمع أن شيئًا ما في المنشور يتطلب تدخلًا يدويًا من قبل أحد الموظفين.”}}
يرجى مراجعة إرشادات مجتمعنا للحصول على التفاصيل.
خطوات التكرار:
تأكد من أن Discourse يتطلب الموافقة على المنشور الأول لكل مستخدم.
قم بإنشاء مستخدم جديد.
قم بإنشاء منشور جديد باستخدام المستخدم الجديد.
باستخدام حساب مسؤول، ارفض المنشور مع خيار “حذف المستخدم”.
يتم إرسال بريد إلكتروني إلى المستخدم الجديد بالمحتوى أعلاه.
إعجابَين (2)
Richie
(Richie Rich)
12 سبتمبر 2025، 7:41ص
2
إذا كان ذلك يساعد، فإليك بعض لقطات الشاشة من عرض المسؤول للمنشور المرفوض:
قبل حذف المستخدم:
بعد الرفض والحذف:
إعجاب واحد (1)
selase
(Selase Krakani)
قسَّم هذا الموضوع في
18 نوفمبر 2025، 11:45ص
3
selase
(Selase Krakani)
12 سبتمبر 2025، 6:24م
4
يبدو أن هذا خطأ في كيفية إنشاء flag_reason هنا:
def account_deleted(email, reviewable)
post_action_type_id =
reviewable.reviewable_scores.first&.reviewable_score_type ||
PostActionTypeView.new.types[:spam]
build_email(
email,
template: "user_notifications.account_deleted",
flag_reason: I18n.t("flag_reasons.#{PostActionTypeView.new.types[post_action_type_id]}"),
)
end
PostActionTypeView.new.types لا يتضمن علامة :needs_approval (التي يتم إنشاؤها في التدفق الموصوف). لهذا السبب، ينتقل مفتاح الترجمة إلى flag_reasons. (بدون لاحقة)، مما يؤدي إلى إرجاع قسم YAML بأكمله بدلاً من إدخال واحد. لهذا السبب يوجد تجزئة Ruby بدلاً من سبب العلامة.
flag_reasons:
off_topic: "Your post was flagged as **off-topic**: the community feels it is not a good fit for the topic, as currently defined by the title and the first post."
inappropriate: "Your post was flagged as **inappropriate**: the community feels it is offensive, abusive, to be hateful conduct or a violation of [our community guidelines](%{base_path}/guidelines)."
illegal: "Your post was flagged as **illegal**: the community thinks it might be breaking the law."
spam: "Your post was flagged as **spam**: the community feels it is an advertisement, something that is overly promotional in nature instead of being useful or relevant to the topic as expected."
notify_moderators: "Your post was flagged **for moderator attention**: the community feels something about the post requires manual intervention by a staff member."
responder:
off_topic: "The post was flagged as **off-topic**: the community feels it is not a good fit for the topic, as currently defined by the title and the first post."
inappropriate: "The post was flagged as **inappropriate**: the community feels it is offensive, abusive, to be hateful conduct or a violation of [our community guidelines](%{base_path}/guidelines)."
spam: "The post was flagged as **spam**: the community feels it is an advertisement, something that is overly promotional in nature instead of being useful or relevant to the topic as expected."
notify_moderators: "The post was flagged **for moderator attention**: the community feels something about the post requires manual intervention by a staff member."
وبالمثل، من المحتمل أن يؤثر هذا على العلامات المخصصة أيضًا، حيث ستكون ترجماتها مفقودة أيضًا.
7 إعجابات
Moin
12 سبتمبر 2025، 6:43م
6
أنا متأكد من ذلك. ذكرت ذلك في مايو
Moin:
Moin:
ملاحظة جانبية:
3 إعجابات
selase
(Selase Krakani)
18 نوفمبر 2025، 11:51ص
7
لقد قمنا بدمج إصلاح للمشكلة في المنشور الأصلي. لقد نقلت التقرير المتعلق بالمستخدمين المرحليين إلى موضوع منفصل لتسهيل تتبعه بانتظار الإصلاح.
main ← fix/deleted-user-email
opened 04:43PM - 24 Sep 25 UTC
`UserNotifications#account_deleted` builds a localized flag reason from the revi… ewable’s first `reviewable_score` (falling back to `spam` if none is found).
Currently, some score types (e.g. `needs_approval`) are not covered. In cases where a "Needs Approval" flag led to an account deletion, the lookup key could end up as `flag_reasons.`, causing the entire `flag_reasons`
section to be rendered instead of a single entry.
This change adds support for additional score types (like `needs_approval`). If no translation exists (e.g. custom flags), the flag’s description will be used if available, before falling back to the default `spam` reason.
More context: https://meta.discourse.org/t/ruby-hash-syntax-being-displayed-in-emails-sent-to-deleted-users/382411
إعجاب واحد (1)