fix(console): keep conversation updated_at unchanged when marking read (#32133)

This commit is contained in:
weiguang li
2026-02-10 17:56:38 +08:00
committed by GitHub
parent 6015f23e79
commit 697b57631a
2 changed files with 40 additions and 1 deletions

View File

@@ -599,7 +599,12 @@ def _get_conversation(app_model, conversation_id):
db.session.execute(
sa.update(Conversation)
.where(Conversation.id == conversation_id, Conversation.read_at.is_(None))
.values(read_at=naive_utc_now(), read_account_id=current_user.id)
# Keep updated_at unchanged when only marking a conversation as read.
.values(
read_at=naive_utc_now(),
read_account_id=current_user.id,
updated_at=Conversation.updated_at,
)
)
db.session.commit()
db.session.refresh(conversation)