fix: extract session ID from properties.info.id for session.created/deleted events
This commit is contained in:
@@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user