mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 07:09:23 +00:00
remove List<TextPart> extensions for texts due to JVM signature conflict and actualize TelegramBotAPI-extensions-api
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.polls
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.justTextSources
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.ReplyingMarkupSendMessageRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.SendMessageRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
@@ -84,7 +85,7 @@ fun Poll.createRequest(
|
||||
correctOptionId,
|
||||
isAnonymous,
|
||||
isClosed,
|
||||
caption ?.fullListOfSubSource(captionEntities) ?.toMarkdownV2Captions() ?.firstOrNull(),
|
||||
caption ?.fullListOfSubSource(captionEntities) ?.justTextSources() ?.toMarkdownV2Captions() ?.firstOrNull(),
|
||||
MarkdownV2,
|
||||
scheduledCloseInfo,
|
||||
disableNotification,
|
||||
|
@@ -57,14 +57,12 @@ fun List<TextSource>.toMarkdownCaptions(): List<String> = createMarkdownText(
|
||||
this,
|
||||
captionLength.last + 1
|
||||
)
|
||||
fun List<TextPart>.toMarkdownCaptions(): List<String> = justTextSources().toMarkdownCaptions()
|
||||
fun CaptionedInput.toMarkdownCaptions(): List<String> = fullEntitiesList().toMarkdownCaptions()
|
||||
|
||||
fun List<TextSource>.toMarkdownTexts(): List<String> = createMarkdownText(
|
||||
this,
|
||||
textLength.last + 1
|
||||
)
|
||||
fun List<TextPart>.toMarkdownTexts(): List<String> = justTextSources().toMarkdownTexts()
|
||||
fun TextContent.toMarkdownTexts(): List<String> = fullEntitiesList().toMarkdownTexts()
|
||||
|
||||
|
||||
@@ -77,14 +75,12 @@ fun List<TextSource>.toMarkdownV2Captions(): List<String> = createMarkdownV2Text
|
||||
this,
|
||||
captionLength.last + 1
|
||||
)
|
||||
fun List<TextPart>.toMarkdownV2Captions(): List<String> = justTextSources().toMarkdownV2Captions()
|
||||
fun CaptionedInput.toMarkdownV2Captions(): List<String> = fullEntitiesList().toMarkdownV2Captions()
|
||||
|
||||
fun List<TextSource>.toMarkdownV2Texts(): List<String> = createMarkdownV2Text(
|
||||
this,
|
||||
textLength.last + 1
|
||||
)
|
||||
fun List<TextPart>.toMarkdownV2Texts(): List<String> = justTextSources().toMarkdownV2Texts()
|
||||
fun TextContent.toMarkdownV2Texts(): List<String> = fullEntitiesList().toMarkdownV2Texts()
|
||||
|
||||
|
||||
@@ -97,14 +93,12 @@ fun List<TextSource>.toHtmlCaptions(): List<String> = createHtmlText(
|
||||
this,
|
||||
captionLength.last + 1
|
||||
)
|
||||
fun List<TextPart>.toHtmlCaptions(): List<String> = justTextSources().toHtmlCaptions()
|
||||
fun CaptionedInput.toHtmlCaptions(): List<String> = fullEntitiesList().toHtmlCaptions()
|
||||
|
||||
fun List<TextSource>.toHtmlTexts(): List<String> = createHtmlText(
|
||||
this,
|
||||
textLength.last + 1
|
||||
)
|
||||
fun List<TextPart>.toHtmlTexts(): List<String> = justTextSources().toHtmlTexts()
|
||||
fun TextContent.toHtmlTexts(): List<String> = fullEntitiesList().toHtmlTexts()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user