@@ -43,7 +43,7 @@ export class BotService implements OnModuleInit {
4343 Object . values ( UpdateEvent ) . map ( ( event ) => {
4444 this . bot . on ( event , ( ctx : Context ) => {
4545 this . logger . log ( `Received ${ event } from ${ ctx . chat . id } ` ) ;
46- this . updateHandler . handle ( ctx ) ;
46+ this . updateHandler . handle ( ctx , event ) ;
4747 this . questionHandler . handle ( ctx ) ;
4848 return ;
4949 } ) ;
@@ -119,60 +119,4 @@ export class BotService implements OnModuleInit {
119119
120120 await ctx . reply ( text , { parse_mode : 'HTML' } ) ;
121121 } ;
122-
123- // protected getSummary = async (ctx: Context) => {
124- // try {
125- // const community = await this.temporalClient.execute(
126- // 'TelegramGetCommunityWorkflow',
127- // {
128- // taskQueue: 'TEMPORAL_QUEUE_LIGHT',
129- // args: [{ chatId: ctx.chat.id }],
130- // workflowId: `telegram:getcommunity:${ctx.update.update_id}`,
131- // },
132- // );
133- // if (!community) {
134- // console.log('No community found for', ctx.chat.id);
135- // return;
136- // }
137-
138- // const platform = await this.temporalClient.execute(
139- // 'TelegramGetPlatformWorkflow',
140- // {
141- // taskQueue: 'TEMPORAL_QUEUE_LIGHT',
142- // args: [{ chatId: ctx.chat.id }],
143- // workflowId: `telegram:getplatform:${ctx.update.update_id}`,
144- // },
145- // );
146- // if (!platform) {
147- // console.log('No platform found for', ctx.chat.id);
148- // return;
149- // }
150-
151- // const summary = await this.temporalClient.execute(
152- // 'PlatformSummariesWorkflow',
153- // {
154- // taskQueue: 'TEMPORAL_QUEUE_PYTHON_LIGHT',
155- // args: [
156- // {
157- // platform_id: platform.id,
158- // community_id: community.id,
159- // start_date: null,
160- // end_date: null,
161- // extract_text_only: true,
162- // },
163- // ],
164- // workflowId: `telegram:summaries:${ctx.update.update_id}`,
165- // },
166- // );
167-
168- // if (!summary || summary.length === 0) {
169- // console.log('No summary found for', ctx.chat.id);
170- // return;
171- // }
172-
173- // await ctx.reply(summary);
174- // } catch (error) {
175- // console.error(error);
176- // }
177- // };
178122}
0 commit comments