@@ -158,6 +158,14 @@ export default class TelegramExecutionContext {
158158 reply_to_message_id : this . getMessageId ( ) ,
159159 video,
160160 } ) ;
161+ case 'business_message' :
162+ return await this . api . sendVideo ( this . bot . api . toString ( ) , {
163+ ...options ,
164+ chat_id : this . getChatId ( ) ,
165+ message_thread_id : this . getThreadId ( ) ,
166+ business_connection_id : this . update . business_message ?. business_connection_id . toString ( ) ?? '' ,
167+ video,
168+ } ) ;
161169 case 'guest_message' :
162170 return await this . answerGuestQueryVideo ( video ) ;
163171 case 'inline' :
@@ -201,6 +209,15 @@ export default class TelegramExecutionContext {
201209 photo,
202210 caption,
203211 } ) ;
212+ case 'business_message' :
213+ return await this . api . sendPhoto ( this . bot . api . toString ( ) , {
214+ ...options ,
215+ chat_id : this . getChatId ( ) ,
216+ message_thread_id : this . getThreadId ( ) ,
217+ business_connection_id : this . update . business_message ?. business_connection_id . toString ( ) ?? '' ,
218+ photo,
219+ caption,
220+ } ) ;
204221 case 'guest_message' :
205222 return await this . answerGuestQueryPhoto ( photo , caption ) ;
206223 case 'inline' :
@@ -233,6 +250,15 @@ export default class TelegramExecutionContext {
233250 voice,
234251 caption,
235252 } ) ;
253+ case 'business_message' :
254+ return await this . api . sendVoice ( this . bot . api . toString ( ) , {
255+ ...options ,
256+ chat_id : this . getChatId ( ) ,
257+ message_thread_id : this . getThreadId ( ) ,
258+ business_connection_id : this . update . business_message ?. business_connection_id . toString ( ) ?? '' ,
259+ voice,
260+ caption,
261+ } ) ;
236262 case 'guest_message' :
237263 return await this . answerGuestQueryVoice ( voice , caption ) ;
238264 default :
@@ -358,12 +384,15 @@ export default class TelegramExecutionContext {
358384 options : Record < string , number | string | boolean | object > = { } ,
359385 ) {
360386 const message_id = this . drafts . get ( draft_id ) ;
387+ const business_connection_id = this . update . business_message ?. business_connection_id . toString ( ) ;
388+
361389 if ( message_id ) {
362390 return await this . api . editMessageText ( this . bot . api . toString ( ) , {
363391 chat_id : this . getChatId ( ) ,
364392 message_id,
365393 text : message ,
366394 parse_mode,
395+ business_connection_id,
367396 ...options ,
368397 } ) ;
369398 }
@@ -382,6 +411,7 @@ export default class TelegramExecutionContext {
382411 message_thread_id : this . getThreadId ( ) ,
383412 text : message ,
384413 parse_mode,
414+ business_connection_id,
385415 } ) ;
386416
387417 if ( response . status === 200 ) {
@@ -469,6 +499,7 @@ export default class TelegramExecutionContext {
469499 return await this . api . sendInvoice ( this . bot . api . toString ( ) , {
470500 chat_id : this . getChatId ( ) ,
471501 message_thread_id : this . getThreadId ( ) ,
502+ business_connection_id : this . update . business_message ?. business_connection_id . toString ( ) ,
472503 title,
473504 description,
474505 payload,
0 commit comments