@@ -115,9 +115,9 @@ def decorator(
115115 [self ._context .handler_tag ] + (other_continue_with or []),
116116 allow_continue_after_self ,
117117 )
118- self ._context .continue_with .callback_query (
118+ self ._context .continue_with .callback_query_from (
119119 _tag ,
120- [ CallbackQuerySenderId ( user_id )] ,
120+ user_id ,
121121 0 ,
122122 include_ctx_data ,
123123 * args ,
@@ -150,9 +150,10 @@ def decorator(
150150 [self ._context .handler_tag ] + (other_continue_with or []),
151151 allow_continue_after_self ,
152152 )
153- self ._context .continue_with .callback_query (
153+ self ._context .continue_with .callback_query_same_message_from (
154154 _tag ,
155- [CallbackQuerySenderId (user_id ), CallbackQueryMessageId (message_id )],
155+ message_id ,
156+ user_id ,
156157 0 ,
157158 include_ctx_data ,
158159 * args ,
@@ -184,9 +185,9 @@ def decorator(
184185 [self ._context .handler_tag ] + (other_continue_with or []),
185186 allow_continue_after_self ,
186187 )
187- self ._context .continue_with .callback_query (
188+ self ._context .continue_with .callback_query_same_message (
188189 _tag ,
189- [ CallbackQueryMessageId ( message_id )] ,
190+ message_id ,
190191 0 ,
191192 include_ctx_data ,
192193 * args ,
@@ -253,8 +254,8 @@ def decorator(
253254 allow_continue_after_self ,
254255 )
255256 self ._context .continue_with .message_from (
256- user_id ,
257257 _tag ,
258+ user_id ,
258259 0 ,
259260 include_ctx_data ,
260261 * args ,
@@ -394,8 +395,8 @@ def message(
394395
395396 def message_from (
396397 self ,
397- user_id : int ,
398398 target_tag : str ,
399+ user_id : int ,
399400 priority : int = 0 ,
400401 include_ctx_data : bool = True ,
401402 * args : Any ,
@@ -430,6 +431,64 @@ def callback_query(
430431 ** kwargs ,
431432 )
432433
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+
433492 def self (
434493 self ,
435494 keys : Sequence [AbstractKeyResolver [CallbackQuery , Any ]],
0 commit comments