Preserve session key when archiving new sessions

This commit is contained in:
chengyongru
2026-06-10 18:09:45 +08:00
committed by Xubin Ren
parent bfc6febddc
commit 8c30dc5a57
3 changed files with 17 additions and 7 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ async def cmd_new(ctx: CommandContext) -> OutboundMessage:
loop.sessions.save(session)
loop.sessions.invalidate(session.key)
if snapshot:
loop._schedule_background(loop.consolidator.archive(snapshot))
loop._schedule_background(loop.consolidator.archive(snapshot, session_key=ctx.key))
return OutboundMessage(
channel=ctx.msg.channel, chat_id=ctx.msg.chat_id,
content="New session started.",