openbot 0.5.9 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1750,11 +1750,17 @@ export const storageService = {
1750
1750
  getOpenBotState: async (options: {
1751
1751
  runId: string;
1752
1752
  agentId: string;
1753
- channelId: string;
1754
- threadId?: string;
1755
1753
  event: OpenBotEvent;
1756
1754
  }): Promise<OpenBotState> => {
1757
- const { runId, agentId, channelId, threadId, event } = options;
1755
+ const { runId, agentId, event } = options;
1756
+ const channelId =
1757
+ typeof event.meta?.channelId === 'string'
1758
+ ? event.meta.channelId.trim() || undefined
1759
+ : undefined;
1760
+ const threadId =
1761
+ typeof event.meta?.threadId === 'string'
1762
+ ? event.meta.threadId.trim() || undefined
1763
+ : undefined;
1758
1764
 
1759
1765
  let agentDetails: AgentDetails;
1760
1766
  try {
@@ -25,8 +25,6 @@ export interface RunAgentHostOptions {
25
25
  runId: string;
26
26
  agentId: string;
27
27
  event: OpenBotEvent;
28
- channelId: string;
29
- threadId?: string;
30
28
  persistEvents?: boolean;
31
29
  publicBaseUrl?: string;
32
30
  onEvent: (event: OpenBotEvent, state?: OpenBotState) => Promise<void>;