fix: 用户隔离完整性 + 聊天去重
1. 启动时不加载历史消息(等第一条消息确定身份后按需恢复) 2. MemoryStore 改为 HashMap<user_id, Vec<mem>>,按用户隔离缓存 3. session.current_user_id 与外部 mutex 同步 4. chat_records.message_id 加 UNIQUE 索引 + ON CONFLICT DO NOTHING
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
-- 聊天记录去重索引
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_chat_records_message_id
|
||||
ON chat_records (message_id) WHERE message_id != '';
|
||||
Reference in New Issue
Block a user