fix(messages): use HTML strong tag instead of markdown, remove reply_to mapping from migration
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f8f8c22bee
commit
51f041baa4
@ -27,7 +27,7 @@ from database import (SessionLocal, PrivateMessage, MessageGroup, MessageGroupMe
|
||||
def build_content(subject, content):
|
||||
"""Prepend subject as bold line if present."""
|
||||
if subject and subject.strip():
|
||||
return f"**{subject.strip()}**\n\n{content}"
|
||||
return f"<p><strong>{subject.strip()}</strong></p>{content}"
|
||||
return content
|
||||
|
||||
|
||||
@ -95,16 +95,15 @@ def migrate_private_messages(db, dry_run):
|
||||
for pm in pair_msgs:
|
||||
full_content = build_content(pm.subject, pm.content)
|
||||
|
||||
# Resolve reply_to_id from old parent_id
|
||||
reply_to_id = None
|
||||
if pm.parent_id and pm.parent_id in pm_id_map:
|
||||
reply_to_id = pm_id_map[pm.parent_id]
|
||||
# Note: old parent_id was thread-root (email-style), not a specific quote.
|
||||
# Don't map to reply_to_id — it would create visual clutter with every
|
||||
# reply quoting the same root message.
|
||||
|
||||
conv_msg = ConvMessage(
|
||||
conversation_id=conv.id,
|
||||
sender_id=pm.sender_id,
|
||||
content=full_content,
|
||||
reply_to_id=reply_to_id,
|
||||
reply_to_id=None,
|
||||
created_at=pm.created_at,
|
||||
)
|
||||
db.add(conv_msg)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user