修复聊天消息不显示最新数据:所有列表查询排序从 created_at DESC 改为 id DESC,记录创建函数显式设置 CreatedAt,后端 v1.2.1 / 前端 v0.3.1

This commit is contained in:
2026-08-07 22:21:26 +08:00
parent b6fabf59b7
commit 92e766dfa8
11 changed files with 19 additions and 12 deletions
+2 -1
View File
@@ -416,8 +416,9 @@ func (s *Service) recordOutboundDirectMessage(bot *storepkg.BotNodeRecord, msg *
BotMessageID: botMessageID,
CreatedBy: createdByPtr,
PublishedAt: msg.PublishedAt,
// 出向消息从产生那一刻起就视为已读,未读计数只关心 inbound。
// 出向消息从产生那一刻起就视为"已读",未读计数只关心 inbound。
ReadAt: &now,
CreatedAt: now,
}
if err := s.store.InsertBotDirectMessage(dm); err != nil {
printJSON(map[string]any{