@@ -115,9 +115,9 @@ def decorator(
115
115
[self ._context .handler_tag ] + (other_continue_with or []),
116
116
allow_continue_after_self ,
117
117
)
118
- self ._context .continue_with .callback_query (
118
+ self ._context .continue_with .callback_query_from (
119
119
_tag ,
120
- [ CallbackQuerySenderId ( user_id )] ,
120
+ user_id ,
121
121
0 ,
122
122
include_ctx_data ,
123
123
* args ,
@@ -150,9 +150,10 @@ def decorator(
150
150
[self ._context .handler_tag ] + (other_continue_with or []),
151
151
allow_continue_after_self ,
152
152
)
153
- self ._context .continue_with .callback_query (
153
+ self ._context .continue_with .callback_query_same_message_from (
154
154
_tag ,
155
- [CallbackQuerySenderId (user_id ), CallbackQueryMessageId (message_id )],
155
+ message_id ,
156
+ user_id ,
156
157
0 ,
157
158
include_ctx_data ,
158
159
* args ,
@@ -184,9 +185,9 @@ def decorator(
184
185
[self ._context .handler_tag ] + (other_continue_with or []),
185
186
allow_continue_after_self ,
186
187
)
187
- self ._context .continue_with .callback_query (
188
+ self ._context .continue_with .callback_query_same_message (
188
189
_tag ,
189
- [ CallbackQueryMessageId ( message_id )] ,
190
+ message_id ,
190
191
0 ,
191
192
include_ctx_data ,
192
193
* args ,
@@ -253,8 +254,8 @@ def decorator(
253
254
allow_continue_after_self ,
254
255
)
255
256
self ._context .continue_with .message_from (
256
- user_id ,
257
257
_tag ,
258
+ user_id ,
258
259
0 ,
259
260
include_ctx_data ,
260
261
* args ,
@@ -394,8 +395,8 @@ def message(
394
395
395
396
def message_from (
396
397
self ,
397
- user_id : int ,
398
398
target_tag : str ,
399
+ user_id : int ,
399
400
priority : int = 0 ,
400
401
include_ctx_data : bool = True ,
401
402
* args : Any ,
@@ -430,6 +431,64 @@ def callback_query(
430
431
** kwargs ,
431
432
)
432
433
434
+ def callback_query_from (
435
+ self ,
436
+ target_tag : str ,
437
+ user_id : int ,
438
+ priority : int = 0 ,
439
+ include_ctx_data : bool = True ,
440
+ * args : Any ,
441
+ ** kwargs : Any ,
442
+ ) -> NoReturn :
443
+ self .any (
444
+ target_tag ,
445
+ CallbackQuery ,
446
+ [CallbackQuerySenderId (user_id )],
447
+ priority ,
448
+ include_ctx_data ,
449
+ * args ,
450
+ ** kwargs ,
451
+ )
452
+
453
+ def callback_query_same_message_from (
454
+ self ,
455
+ target_tag : str ,
456
+ message_id : int ,
457
+ user_id : int ,
458
+ priority : int = 0 ,
459
+ include_ctx_data : bool = True ,
460
+ * args : Any ,
461
+ ** kwargs : Any ,
462
+ ) -> NoReturn :
463
+ self .any (
464
+ target_tag ,
465
+ CallbackQuery ,
466
+ [CallbackQuerySenderId (user_id ), CallbackQueryMessageId (message_id )],
467
+ priority ,
468
+ include_ctx_data ,
469
+ * args ,
470
+ ** kwargs ,
471
+ )
472
+
473
+ def callback_query_same_message (
474
+ self ,
475
+ target_tag : str ,
476
+ message_id : int ,
477
+ priority : int = 0 ,
478
+ include_ctx_data : bool = True ,
479
+ * args : Any ,
480
+ ** kwargs : Any ,
481
+ ) -> NoReturn :
482
+ self .any (
483
+ target_tag ,
484
+ CallbackQuery ,
485
+ [CallbackQueryMessageId (message_id )],
486
+ priority ,
487
+ include_ctx_data ,
488
+ * args ,
489
+ ** kwargs ,
490
+ )
491
+
433
492
def self (
434
493
self ,
435
494
keys : Sequence [AbstractKeyResolver [CallbackQuery , Any ]],
0 commit comments