File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ export async function TelegramEventWorkflow({
3131 ) ;
3232 }
3333
34- const vectorIngestionWorkflow = await startChild ( 'TelegramVectorIngestionWorkflow' , {
35- taskQueue : 'TEMPORAL_QUEUE_HEAVY' ,
36- args : [ { event, update } ] ,
37- workflowId : `telegram:vector-ingestion:${ update . update_id } ` ,
38- } ) ;
39-
40- await vectorIngestionWorkflow . result ( ) ;
34+ // Vector ingestion only supports message and edited message events
35+ if ( event === TelegramEvent . MESSAGE || event === TelegramEvent . EDITED_MESSAGE ) {
36+ const vectorIngestionWorkflow = await startChild ( 'TelegramVectorIngestionWorkflow' , {
37+ taskQueue : 'TEMPORAL_QUEUE_HEAVY' ,
38+ args : [ { event, update } ] ,
39+ workflowId : `telegram:vector-ingestion:${ update . update_id } ` ,
40+ } ) ;
41+ await vectorIngestionWorkflow . result ( ) ;
42+ }
4143}
You can’t perform that action at this time.
0 commit comments