كان هذا معقدًا للغاية
main ← fix-show-unread-indicator-to-reply-messages-in-dms
opened 05:59PM - 30 Dec 25 UTC
When someone replies to a message in a DM channel (where threading is disabled),… the system internally creates a thread to track the reply chain. However, the unread count query was excluding all thread messages, which meant these replies never showed up as unread in the sidebar.
The fix has three parts:
1. Update ChannelUnreadsQuery to include DM thread replies in the unread_count. We specifically check for DirectMessage channels with threading disabled, and only count messages from other users that haven't been read yet.
2. When creating a reply in a DM, add all channel participants to the thread (not just the sender and OM author). This ensures everyone has a thread membership that can be used for tracking read state.
3. When marking a DM channel as read, also mark any thread memberships as read. Without this, the unread indicator would persist even after viewing the channel since the thread membership's last_read wasn't being updated.
Ref - https://meta.discourse.org/t/384734
الخلاصة هي أنه في الرسائل الخاصة (DMs) حيث يتم تعطيل الترابط (وهو الإعداد الافتراضي)، لن يتم احتساب الرد بشكل صحيح ضمن “غير مقروء” لأننا نقوم داخليًا بإنشاء ترابط لتتبع سلسلة الردود.
3 إعجابات