diff --git a/tgbotapi.core/api/tgbotapi.core.api b/tgbotapi.core/api/tgbotapi.core.api index f14bef108c..3a0afd3d70 100644 --- a/tgbotapi.core/api/tgbotapi.core.api +++ b/tgbotapi.core/api/tgbotapi.core.api @@ -9683,8 +9683,10 @@ public final class dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/Inlin public static final field Companion Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle$Companion; public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputMessageContent;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputMessageContent;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputMessageContent;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputMessageContent;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public fun getDescription ()Ljava/lang/String; - public final fun getHideUrl ()Ljava/lang/Boolean; + public final fun getHideUrl ()Z public fun getId-5UnZwr4 ()Ljava/lang/String; public fun getInputMessageContent ()Ldev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputMessageContent; public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle.kt index bb632e356b..9c7ecdc90c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle.kt @@ -19,8 +19,6 @@ class InlineQueryResultArticle( override val replyMarkup: InlineKeyboardMarkup? = null, @SerialName(urlField) override val url: String? = null, - @SerialName(hideUrlField) - val hideUrl: Boolean? = null, @SerialName(descriptionField) override val description: String? = null, @SerialName(thumbnailUrlField) @@ -36,4 +34,31 @@ class InlineQueryResultArticle( WithInputMessageContentInlineQueryResult, UrlInlineQueryResult { override val type: String = "article" + @Deprecated("Field hide_url has been deprecated in Bot API 8.2. Use empty url instead") + val hideUrl: Boolean + get() = url != null && url.isEmpty() + + @Deprecated("Field hide_url has been deprecated in Bot API 8.2. Use empty url instead") + constructor( + id: InlineQueryId, + title: String, + inputMessageContent: InputMessageContent, + replyMarkup: InlineKeyboardMarkup? = null, + url: String? = null, + hideUrl: Boolean?, + description: String? = null, + thumbnailUrl: String? = null, + thumbnailWidth: Int? = null, + thumbnailHeight: Int? = null + ) : this( + id = id, + title = title, + inputMessageContent = inputMessageContent, + replyMarkup = replyMarkup, + url = url, + description = description, + thumbnailUrl = thumbnailUrl, + thumbnailWidth = thumbnailWidth, + thumbnailHeight = thumbnailHeight + ) }