From f80fb33402c0a3622d3bde1a7969b7ef88b8e44f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 29 Jan 2019 08:14:52 +0800 Subject: [PATCH 1/6] start 0.9.1 --- CHANGELOG.md | 2 ++ build.gradle | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0adf2b8077..c0b290dde4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ * Add `RequestLimiter` and base realisations * Now `KtorRequestsExecutor` can receive as one of parameters `RequestLimiter` (by default - `EmptyLimiter`) +### 0.9.1 + ### 0.8.5 * Add extension `String#toMarkdown` diff --git a/build.gradle b/build.gradle index 4b60baaa21..42460f767d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -project.version = "0.9.0" +project.version = "0.9.1" project.group = "com.github.insanusmokrassar" buildscript { From eab147a38f3f42846b2a7d3962aaa6fdc975c151 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 29 Jan 2019 08:18:07 +0800 Subject: [PATCH 2/6] update texts lengths restrictions --- CHANGELOG.md | 2 ++ .../TelegramBotAPI/types/Common.kt | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0b290dde4..7862510af2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ ### 0.9.1 +* Updated built-in lengths restrictions + ### 0.8.5 * Add extension `String#toMarkdown` diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt index 8e5431c570..e9e28b1d50 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt @@ -16,17 +16,17 @@ typealias ShippingOptionIdentifier = String typealias StartParameter = String typealias InlineMessageIdentifier = String -val callbackQueryAnswerLength = 0 .. 200 -val captionLength = 0 .. 1024 -val textLength = 0 .. 4096 +val callbackQueryAnswerLength = 0 until 200 +val captionLength = 0 until 1024 +val textLength = 0 until 4096 val userProfilePhotosRequestLimit = 0 .. 100 -val chatTitleLength = 1 .. 255 -val chatDescriptionLength = 0 .. 255 -val inlineResultQueryIdLingth = 1 .. 64 +val chatTitleLength = 1 until 255 +val chatDescriptionLength = 0 until 256 +val inlineResultQueryIdLingth = 1 until 64 -val invoiceTitleLimit = 1 .. 32 -val invoiceDescriptionLimit = 1 .. 255 -val invoicePayloadBytesLimit = 1 .. 128 +val invoiceTitleLimit = 1 until 32 +val invoiceDescriptionLimit = 1 until 256 +val invoicePayloadBytesLimit = 1 until 128 const val chatIdField = "chat_id" const val messageIdField = "message_id" From 2af4ebcd44a14fb8f2217749018c3a4ee3065bc3 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 29 Jan 2019 08:18:52 +0800 Subject: [PATCH 3/6] apply length restrictions to all textable send requests --- CHANGELOG.md | 1 + .../TelegramBotAPI/requests/send/SendMessage.kt | 5 +++++ .../TelegramBotAPI/requests/send/media/SendAnimation.kt | 7 +++++++ .../TelegramBotAPI/requests/send/media/SendAudio.kt | 7 +++++++ .../TelegramBotAPI/requests/send/media/SendDocument.kt | 7 +++++++ .../TelegramBotAPI/requests/send/media/SendPhoto.kt | 8 ++++++++ .../TelegramBotAPI/requests/send/media/SendVideo.kt | 7 +++++++ .../TelegramBotAPI/requests/send/media/SendVideoNote.kt | 7 +++++++ .../TelegramBotAPI/requests/send/media/SendVoice.kt | 7 +++++++ 9 files changed, 56 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7862510af2..cd5b130555 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ### 0.9.1 * Updated built-in lengths restrictions +* Apply restrictions of text limit for sending messages ### 0.8.5 diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendMessage.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendMessage.kt index 4216548fb4..1e6c7b5d8e 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendMessage.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendMessage.kt @@ -35,6 +35,11 @@ data class SendMessage( TextableSendMessageRequest, DisableWebPagePreview { + init { + if (text.length !in textLength) { + throw IllegalArgumentException("Text must be in $textLength range") + } + } override fun method(): String = "sendMessage" override fun resultSerializer(): KSerializer = RawMessage.serializer() diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAnimation.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAnimation.kt index 993fc8e2a7..175a63a7f6 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAnimation.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAnimation.kt @@ -95,6 +95,13 @@ data class SendAnimationData internal constructor( DuratedSendMessageRequest, SizedSendMessageRequest { + init { + text ?.let { + if (it.length !in captionLength) { + throw IllegalArgumentException("Caption must be in $captionLength range") + } + } + } override fun method(): String = "sendAnimation" override fun resultSerializer(): KSerializer = RawMessage.serializer() diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAudio.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAudio.kt index 653621b317..82df382757 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAudio.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAudio.kt @@ -95,6 +95,13 @@ data class SendAudioData internal constructor( TitledSendMessageRequest, DuratedSendMessageRequest { + init { + text ?.let { + if (it.length !in captionLength) { + throw IllegalArgumentException("Caption must be in $captionLength range") + } + } + } override fun method(): String = "sendAudio" override fun resultSerializer(): KSerializer = RawMessage.serializer() diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendDocument.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendDocument.kt index 05f22cc523..55e2c67357 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendDocument.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendDocument.kt @@ -78,6 +78,13 @@ data class SendDocumentData internal constructor( TextableSendMessageRequest, ThumbedSendMessageRequest { + init { + text ?.let { + if (it.length !in captionLength) { + throw IllegalArgumentException("Caption must be in $captionLength range") + } + } + } override fun method(): String = "sendDocument" override fun resultSerializer(): KSerializer = RawMessage.serializer() diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendPhoto.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendPhoto.kt index a00684817b..2d5abe34c7 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendPhoto.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendPhoto.kt @@ -63,6 +63,14 @@ data class SendPhotoData internal constructor( ReplyingMarkupSendMessageRequest, TextableSendMessageRequest { + init { + text ?.let { + if (it.length !in captionLength) { + throw IllegalArgumentException("Caption must be in $captionLength range") + } + } + } + override fun method(): String = "sendPhoto" override fun resultSerializer(): KSerializer = RawMessage.serializer() } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideo.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideo.kt index cdacb0f009..884c22c12a 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideo.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideo.kt @@ -100,6 +100,13 @@ data class SendVideoData internal constructor( DuratedSendMessageRequest, SizedSendMessageRequest { + init { + text ?.let { + if (it.length !in captionLength) { + throw IllegalArgumentException("Caption must be in $captionLength range") + } + } + } override fun method(): String = "sendVideo" override fun resultSerializer(): KSerializer = RawMessage.serializer() diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideoNote.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideoNote.kt index 3bedeec3c1..61d876b225 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideoNote.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideoNote.kt @@ -94,6 +94,13 @@ data class SendVideoNoteData internal constructor( override val height: Int? get() = width + init { + text ?.let { + if (it.length !in captionLength) { + throw IllegalArgumentException("Caption must be in $captionLength range") + } + } + } override fun method(): String = "sendVideoNote" override fun resultSerializer(): KSerializer = RawMessage.serializer() diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVoice.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVoice.kt index 2db410591b..175135b727 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVoice.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVoice.kt @@ -84,6 +84,13 @@ data class SendVoiceData internal constructor( ThumbedSendMessageRequest, DuratedSendMessageRequest { + init { + text ?.let { + if (it.length !in captionLength) { + throw IllegalArgumentException("Caption must be in $captionLength range") + } + } + } override fun method(): String = "sendVoice" override fun resultSerializer(): KSerializer = RawMessage.serializer() From 81029db1650cef8769c944d37ab869b30eea79cb Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 29 Jan 2019 09:47:01 +0800 Subject: [PATCH 4/6] RegularTextMessageEntity and convertToFullMessageEntityList --- CHANGELOG.md | 3 ++ .../MessageEntity/RegularTextMessageEntity.kt | 7 +++ .../TelegramBotAPI/utils/CaptionSourcer.kt | 47 +++++++++++++------ 3 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RegularTextMessageEntity.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index cd5b130555..d996a84e50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ * Updated built-in lengths restrictions * Apply restrictions of text limit for sending messages +* Add `RegularTextMessageEntity` which is useful for representing regular text message entity +* Add `convertToFullMessageEntityList` which create list of entities with `RegularTextMessageEntity` on places where +must be regular text ### 0.8.5 diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RegularTextMessageEntity.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RegularTextMessageEntity.kt new file mode 100644 index 0000000000..5c899b71e8 --- /dev/null +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RegularTextMessageEntity.kt @@ -0,0 +1,7 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity + +data class RegularTextMessageEntity( + override val offset: Int, + override val length: Int, + override val sourceString: String +) : MessageEntity diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionSourcer.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionSourcer.kt index 45221f7716..615784cfd0 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionSourcer.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionSourcer.kt @@ -1,6 +1,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.utils import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.MessageEntity +import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.RegularTextMessageEntity import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.TextContent import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.CaptionedMediaContent import com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.toMarkdown @@ -9,21 +10,7 @@ fun createMarkdownText( text: String, messageEntities: List ): String { - val builder = StringBuilder() - var offset = 0 - for (entity in messageEntities) { - builder.append( - text.substring(offset until entity.offset).toMarkdown() - ) - builder.append( - entity.asMarkdownSource - ) - offset += entity.length - } - builder.append( - text.substring(offset).toMarkdown() - ) - return builder.toString() + return convertToFullMessageEntityList(text, messageEntities).joinToString("", "", "") { it.asMarkdownSource } } fun CaptionedMediaContent.toMarkdownCaption(): String? = caption ?.let { @@ -33,7 +20,37 @@ fun CaptionedMediaContent.toMarkdownCaption(): String? = caption ?.let { ) } +fun CaptionedMediaContent.fullEntitiesList(): List = caption ?.let { + convertToFullMessageEntityList(it, captionEntities) +} ?: emptyList() + fun TextContent.toMarkdownText(): String = createMarkdownText( text, entities ) + +fun TextContent.fullEntitiesList(): List = convertToFullMessageEntityList(text, entities) + +fun convertToFullMessageEntityList( + text: String, + messageEntities: List +): List { + val result = mutableListOf() + + var offset = 0 + for (entity in messageEntities) { + val newEntitySize = entity.offset - offset + if (newEntitySize > 0) { + val regularEntity = RegularTextMessageEntity(offset, newEntitySize, text.substring(offset, entity.offset)) + result.add(regularEntity) + offset += regularEntity.length + } + result.add(entity) + offset += entity.length + } + val newEntitySize = text.length - offset + if (newEntitySize > 0) { + result.add(RegularTextMessageEntity(offset, newEntitySize, text.substring(offset, text.length))) + } + return result +} From 4c0472a139d420535b74fde3b319e92ffde65d67 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 29 Jan 2019 10:13:59 +0800 Subject: [PATCH 5/6] new "createMarkdownText" --- CHANGELOG.md | 2 + .../TelegramBotAPI/utils/CaptionSourcer.kt | 68 ++++++++++++++++--- 2 files changed, 61 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d996a84e50..8fb7d16720 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ * Add `RegularTextMessageEntity` which is useful for representing regular text message entity * Add `convertToFullMessageEntityList` which create list of entities with `RegularTextMessageEntity` on places where must be regular text +* Change signature of `createMarkdownText`: now it will return list of strings +* Deprecate old signatures of `createMarkdownText`, `toMarkdownCaption`, `toMarkdownText` ### 0.8.5 diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionSourcer.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionSourcer.kt index 615784cfd0..0024ae2bdd 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionSourcer.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionSourcer.kt @@ -2,31 +2,81 @@ package com.github.insanusmokrassar.TelegramBotAPI.utils import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.MessageEntity import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.RegularTextMessageEntity +import com.github.insanusmokrassar.TelegramBotAPI.types.captionLength import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.TextContent import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.CaptionedMediaContent +import com.github.insanusmokrassar.TelegramBotAPI.types.textLength import com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.toMarkdown +@Deprecated( + "Deprecated because old version have problem with long texts, but new one must return list of strings" +) fun createMarkdownText( text: String, messageEntities: List ): String { - return convertToFullMessageEntityList(text, messageEntities).joinToString("", "", "") { it.asMarkdownSource } + return createMarkdownText( + convertToFullMessageEntityList(text, messageEntities) + ).first() } -fun CaptionedMediaContent.toMarkdownCaption(): String? = caption ?.let { - createMarkdownText( - it, - captionEntities - ) +fun createMarkdownText( + entities: List, + partLength: Int = 4096 +): List { + val texts = mutableListOf() + val textBuilder = StringBuilder(partLength) + for (entity in entities) { + val string = entity.asMarkdownSource + if (textBuilder.length + string.length > partLength) { + if (textBuilder.isNotEmpty()) { + texts.add(textBuilder.toString()) + textBuilder.clear() + } + val chunked = string.chunked(partLength) + val last = chunked.last() + textBuilder.append(last) + val listToAdd = if (chunked.size > 1) { + chunked.subList(0, chunked.size - 1) + } else { + emptyList() + } + listToAdd.forEach { + texts.add(it) + } + } else { + textBuilder.append(string) + } + } + if (textBuilder.isNotEmpty()) { + texts.add(textBuilder.toString()) + textBuilder.clear() + } + return texts } +@Deprecated( + "Deprecated because old version have problem with long texts, but new one must return list of strings" +) +fun CaptionedMediaContent.toMarkdownCaption(): String? = toMarkdownCaptions().firstOrNull() + +fun CaptionedMediaContent.toMarkdownCaptions(): List = createMarkdownText( + fullEntitiesList(), + captionLength.endInclusive + 1 +) + fun CaptionedMediaContent.fullEntitiesList(): List = caption ?.let { convertToFullMessageEntityList(it, captionEntities) } ?: emptyList() -fun TextContent.toMarkdownText(): String = createMarkdownText( - text, - entities +@Deprecated( + "Deprecated because old version have problem with long texts, but new one must return list of strings" +) +fun TextContent.toMarkdownText(): String = toMarkdownTexts().first() + +fun TextContent.toMarkdownTexts(): List = createMarkdownText( + fullEntitiesList(), + textLength.endInclusive + 1 ) fun TextContent.fullEntitiesList(): List = convertToFullMessageEntityList(text, entities) From d79d1637505a4793a696d65cae50409b8fb29b8a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 29 Jan 2019 10:22:09 +0800 Subject: [PATCH 6/6] ResendableContent#createResends --- CHANGELOG.md | 2 ++ .../types/message/content/TextContent.kt | 18 ++++++++++++++++++ .../content/abstracts/ResendableContent.kt | 7 +++++++ 3 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb7d16720..04a9c2c6fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ must be regular text * Change signature of `createMarkdownText`: now it will return list of strings * Deprecate old signatures of `createMarkdownText`, `toMarkdownCaption`, `toMarkdownText` +* Add `ResendableContent#createResends` which create adapted list of resends for content +* Add `TextContent` own `createResends` realisation ### 0.8.5 diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/TextContent.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/TextContent.kt index 7c1bb551b3..005aece25d 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/TextContent.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/TextContent.kt @@ -10,6 +10,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MessageContent import com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownText +import com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownTexts data class TextContent( val text: String, @@ -29,4 +30,21 @@ data class TextContent( replyToMessageId, replyMarkup ) + + override fun createResends( + chatId: ChatIdentifier, + disableNotification: Boolean, + replyToMessageId: MessageIdentifier?, + replyMarkup: KeyboardMarkup? + ): List> = toMarkdownTexts().map { + SendMessage( + chatId, + it, + MarkdownParseMode, + false, + disableNotification, + replyToMessageId, + replyMarkup + ) + } } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/ResendableContent.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/ResendableContent.kt index 0ad2ccf49d..2d53a39568 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/ResendableContent.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/ResendableContent.kt @@ -13,4 +13,11 @@ interface ResendableContent { replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null ): Request + + fun createResends( + chatId: ChatIdentifier, + disableNotification: Boolean = false, + replyToMessageId: MessageIdentifier? = null, + replyMarkup: KeyboardMarkup? = null + ): List> = listOf(createResend(chatId, disableNotification, replyToMessageId, replyMarkup)) } \ No newline at end of file