Fix external triggers not getting snippet context

This commit is contained in:
Andrew Kingston 2024-03-13 09:42:31 +00:00
parent 1eafd5e843
commit c25ea7a9d7
2 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,6 @@ export async function externalTrigger(
const data: AutomationData = { automation, event: params as any }
if (getResponses) {
await context.ensureSnippetContext()
data.event = {
...data.event,
appId: context.getAppId(),

View File

@ -625,6 +625,7 @@ export async function executeInThread(job: Job<AutomationData>) {
})
return await context.doInAppContext(appId, async () => {
await context.ensureSnippetContext()
const envVars = await sdkUtils.getEnvironmentVariables()
// put into automation thread for whole context
return await context.doInEnvironmentContext(envVars, async () => {