From b81308da8bc55cbd9f44e06b3dbff8bec6b8c20f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 1 Jul 2023 13:53:26 +0600 Subject: [PATCH] get back default filters for the queries but fix them --- CHANGELOG.md | 2 -- .../filters/MessageFilterByChat.kt | 24 +++++++++---- .../CallbackQueryTriggers.kt | 35 ++++++++++--------- .../CallbackQueryTriggersUnhandled.kt | 7 ++-- .../triggers_handling/InlineQueryTriggers.kt | 15 ++++---- 5 files changed, 48 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66700099ec..b1b2da0212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,6 @@ * Now it is possible to get raw updates with `GetUpdatesRaw` request * `Utils`: * Improve extension `Update.sourceChat` to add opportunity to select some chats by logic different with the default -* `BehaviourBuilder`: - * All query triggers got null default subcontext filter ## 8.1.0 diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/filters/MessageFilterByChat.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/filters/MessageFilterByChat.kt index 3bed7dcfda..85bbad10ba 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/filters/MessageFilterByChat.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/filters/MessageFilterByChat.kt @@ -16,7 +16,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * Allow only events from the same chat as base [Message] */ val MessageFilterByChat: BehaviourContextAndTwoTypesReceiver = { message, update -> - update.sourceChat() ?.id == message.chat.id + update.sourceChat() ?.let { + it.id == message.chat.id + } != false } /** * Allow only events from the same chat as base [List] of [Message] @@ -30,31 +32,41 @@ val MessagesFilterByChat: BehaviourContextAndTwoTypesReceiver = { query, update -> - update.sourceChat() ?.id == query.user.id + update.sourceUser() ?.let { + it.id == query.user.id + } != false } /** * Allow only updates from the same user as base [ShippingQuery.user] */ val ShippingQueryFilterByUser: BehaviourContextAndTwoTypesReceiver = { query, update -> - update.sourceChat() ?.id == query.user.id + update.sourceUser() ?.let { + it.id == query.user.id + } != false } /** * Allow only updates from the same user as base [ShippingQuery.user] */ val PreCheckoutQueryFilterByUser: BehaviourContextAndTwoTypesReceiver = { query, update -> - update.sourceUser() ?.id == query.user.id + update.sourceUser() ?.let { + it.id == query.user.id + } != false } /** * Allow only updates from the same user as base [InlineQuery.from] */ val InlineQueryFilterByUser: BehaviourContextAndTwoTypesReceiver = { query, update -> - update.sourceUser() ?.id == query.from.id + update.sourceUser() ?.let { + it.id == query.user.id + } != false } /** * Allow only events from the same chat as base [ChatMemberUpdated] */ val ChatMemberUpdatedFilterByChat: BehaviourContextAndTwoTypesReceiver = { updated, update -> - update.sourceChat() ?.id == updated.chat.id + update.sourceChat() ?.let { + it.id == updated.chat.id + } != false } /** * Allow only events from the same chat as base [ChatMemberUpdated] diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggers.kt index 295ca7d02c..c2ca912858 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggers.kt @@ -5,6 +5,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling import dev.inmo.micro_utils.coroutines.launchSafelyWithoutExceptions import dev.inmo.micro_utils.coroutines.runCatchingSafely import dev.inmo.tgbotapi.extensions.behaviour_builder.* +import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.CallbackQueryFilterByUser import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserCallbackQueryMarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory @@ -16,7 +17,7 @@ import kotlinx.coroutines.Job internal suspend inline fun BC.onCallbackQuery( initialFilter: SimpleFilter? = null, - noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) { @@ -37,7 +38,7 @@ internal suspend inline fun B */ internal suspend inline fun BC.onDataCallbackQueryCounted( initialFilter: SimpleFilter? = null, - noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job { @@ -79,7 +80,7 @@ internal suspend inline fun BC.onDataCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onDataCallbackQueryCounted( @@ -106,7 +107,7 @@ suspend fun BC.onDataCallbackQuery( suspend fun BC.onDataCallbackQuery( dataRegex: Regex, initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onDataCallbackQuery( @@ -134,7 +135,7 @@ suspend fun BC.onDataCallbackQuery( suspend fun BC.onDataCallbackQuery( data: String, initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onDataCallbackQuery( @@ -159,7 +160,7 @@ suspend fun BC.onDataCallbackQuery( */ suspend fun BC.onGameShortNameCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery( @@ -183,7 +184,7 @@ suspend fun BC.onGameShortNameCallbackQuery( */ suspend fun BC.onInlineMessageIdCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery( @@ -207,7 +208,7 @@ suspend fun BC.onInlineMessageIdCallbackQuery( */ suspend fun BC.onInlineMessageIdDataCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onDataCallbackQueryCounted( @@ -234,7 +235,7 @@ suspend fun BC.onInlineMessageIdDataCallbackQuery( suspend fun BC.onInlineMessageIdDataCallbackQuery( dataRegex: Regex, initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onInlineMessageIdDataCallbackQuery( @@ -262,7 +263,7 @@ suspend fun BC.onInlineMessageIdDataCallbackQuery( suspend fun BC.onInlineMessageIdDataCallbackQuery( data: String, initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onInlineMessageIdDataCallbackQuery( @@ -287,7 +288,7 @@ suspend fun BC.onInlineMessageIdDataCallbackQuery( */ suspend fun BC.onInlineMessageIdGameShortNameCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery( @@ -311,7 +312,7 @@ suspend fun BC.onInlineMessageIdGameShortNameCallbackQue */ suspend fun BC.onMessageCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery( @@ -335,7 +336,7 @@ suspend fun BC.onMessageCallbackQuery( */ suspend fun BC.onMessageDataCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onDataCallbackQueryCounted( @@ -362,7 +363,7 @@ suspend fun BC.onMessageDataCallbackQuery( suspend fun BC.onMessageDataCallbackQuery( dataRegex: Regex, initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onMessageDataCallbackQuery( @@ -390,7 +391,7 @@ suspend fun BC.onMessageDataCallbackQuery( suspend fun BC.onMessageDataCallbackQuery( data: String, initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onMessageDataCallbackQuery( @@ -415,7 +416,7 @@ suspend fun BC.onMessageDataCallbackQuery( */ suspend fun BC.onMessageGameShortNameCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery( @@ -439,7 +440,7 @@ suspend fun BC.onMessageGameShortNameCallbackQuery( */ suspend fun BC.onUnknownCallbackQueryType( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery( diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersUnhandled.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersUnhandled.kt index 95889f052c..ef0c85a334 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersUnhandled.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersUnhandled.kt @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling import dev.inmo.tgbotapi.extensions.behaviour_builder.* +import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.CallbackQueryFilterByUser import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.* import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserCallbackQueryMarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory @@ -25,7 +26,7 @@ import dev.inmo.tgbotapi.utils.PreviewFeature @PreviewFeature suspend fun BC.onUnhandledDataCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery ( @@ -50,7 +51,7 @@ suspend fun BC.onUnhandledDataCallbackQuery( @PreviewFeature suspend fun BC.onUnhandledInlineMessageIdDataCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery ( @@ -75,7 +76,7 @@ suspend fun BC.onUnhandledInlineMessageIdDataCallbackQue @PreviewFeature suspend fun BC.onUnhandledMessageDataCallbackQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = CallbackQueryFilterByUser, markerFactory: MarkerFactory = ByUserCallbackQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onCallbackQuery( diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggers.kt index 432213f547..8106a24084 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggers.kt @@ -1,6 +1,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling import dev.inmo.tgbotapi.extensions.behaviour_builder.* +import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.InlineQueryFilterByUser import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserInlineQueryMarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory @@ -10,7 +11,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update internal suspend inline fun BC.onInlineQuery( initialFilter: SimpleFilter? = null, - noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = InlineQueryFilterByUser, markerFactory: MarkerFactory = ByUserInlineQueryMarkerFactory, noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) { @@ -19,7 +20,7 @@ internal suspend inline fun BC. /** * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call - * @param subcontextUpdatesFilter **Default is [null]]**. This filter will be applied to each update inside of [scenarioReceiver]. For example, + * @param subcontextUpdatesFilter **Default is [InlineQueryFilterByUser]]**. This filter will be applied to each update inside of [scenarioReceiver]. For example, * this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage]. * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own. * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times] @@ -31,7 +32,7 @@ internal suspend inline fun BC. */ suspend fun BC.onAnyInlineQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = InlineQueryFilterByUser, markerFactory: MarkerFactory = ByUserInlineQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) @@ -39,7 +40,7 @@ suspend fun BC.onAnyInlineQuery( /** * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call - * @param subcontextUpdatesFilter **Default is [null]]**. This filter will be applied to each update inside of [scenarioReceiver]. For example, + * @param subcontextUpdatesFilter **Default is [InlineQueryFilterByUser]]**. This filter will be applied to each update inside of [scenarioReceiver]. For example, * this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage]. * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own. * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times] @@ -51,7 +52,7 @@ suspend fun BC.onAnyInlineQuery( */ suspend fun BC.onBaseInlineQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = InlineQueryFilterByUser, markerFactory: MarkerFactory = ByUserInlineQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) @@ -59,7 +60,7 @@ suspend fun BC.onBaseInlineQuery( /** * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call - * @param subcontextUpdatesFilter **Default is [null]]**. This filter will be applied to each update inside of [scenarioReceiver]. For example, + * @param subcontextUpdatesFilter **Default is [InlineQueryFilterByUser]]**. This filter will be applied to each update inside of [scenarioReceiver]. For example, * this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage]. * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own. * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times] @@ -71,7 +72,7 @@ suspend fun BC.onBaseInlineQuery( */ suspend fun BC.onLocationInlineQuery( initialFilter: SimpleFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver? = InlineQueryFilterByUser, markerFactory: MarkerFactory = ByUserInlineQueryMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)