Add files via upload

This commit is contained in:
公明
2025-12-25 01:55:08 +08:00
committed by GitHub
parent 26f131bb77
commit e818ea61de
3 changed files with 15 additions and 8 deletions

View File

@@ -292,9 +292,10 @@ func (db *DB) UpdateConversationPinned(id string, pinned bool) error {
if pinned {
pinnedValue = 1
}
// 注意:不更新 updated_at因为置顶操作不应该改变对话的更新时间
_, err := db.Exec(
"UPDATE conversations SET pinned = ?, updated_at = ? WHERE id = ?",
pinnedValue, time.Now(), id,
"UPDATE conversations SET pinned = ? WHERE id = ?",
pinnedValue, id,
)
if err != nil {
return fmt.Errorf("更新对话置顶状态失败: %w", err)