Skip to content

Commit dd20d66

Browse files
committed
fix: Cast userId to string in OpenAI SDK listener handler
1 parent 1b8691f commit dd20d66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openai-agents-sdk/listeners/events/message.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function handleMessage({ client, context, event, logger, say, saySt
6060

6161
// For issue submissions the bot posted the message, so the real
6262
// user_id comes from the metadata rather than the event context.
63-
const userId = issueMetadata ? issueMetadata.event_payload.user_id : context.userId;
63+
const userId = issueMetadata ? issueMetadata.event_payload.user_id : /** @type {string} */ (context.userId);
6464

6565
// Get conversation history
6666
const history = conversationStore.getHistory(channelId, threadTs);

0 commit comments

Comments
 (0)