fix: extract session ID from properties.info.id for session.created/deleted events

This commit is contained in:
YeonGyu-Kim
2026-03-16 17:38:47 +09:00
parent 03b346ba51
commit 450685f5ea

View File

@@ -12,8 +12,12 @@ export function createOpenClawSenderHook(
event: { type: string; properties?: Record<string, unknown> }; event: { type: string; properties?: Record<string, unknown> };
}) => { }) => {
const { type, properties } = input.event; const { type, properties } = input.event;
const info = properties?.info as Record<string, unknown> | undefined;
const context: OpenClawContext = { const context: OpenClawContext = {
sessionId: (properties?.sessionID as string) || getMainSessionID(), sessionId:
(properties?.sessionID as string) ||
(info?.id as string) ||
getMainSessionID(),
projectPath: ctx.directory, projectPath: ctx.directory,
}; };