Revert "Mail list: show who wrote, not everyone involved"
This reverts commit 550b8cf503.
This commit is contained in:
@@ -197,16 +197,6 @@ async def denormalize_thread(session: AsyncSession, thread_id: uuid.UUID) -> Non
|
||||
seen_emails.add(email)
|
||||
participants.append({"name": addr.get("name", ""), "email": addr.get("email", "")})
|
||||
|
||||
senders: list[dict[str, str]] = []
|
||||
seen_senders: set[str] = set()
|
||||
for msg in messages: # newest first => most recent writer leads
|
||||
for addr in msg.from_addr:
|
||||
email = (addr.get("email") or "").lower()
|
||||
if email and email not in seen_senders:
|
||||
seen_senders.add(email)
|
||||
senders.append({"name": addr.get("name", ""), "email": addr.get("email", "")})
|
||||
|
||||
thread.senders = senders
|
||||
thread.message_count = len(messages)
|
||||
thread.unread_count = sum(1 for m in messages if "\\Seen" not in m.flags)
|
||||
thread.has_attachments = any(m.has_attachments for m in messages)
|
||||
|
||||
Reference in New Issue
Block a user