1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-29 13:38:43 +00:00

fixes in new "asInputMedia" functions

This commit is contained in:
InsanusMokrassar 2020-01-21 14:30:33 +06:00
parent 353891eb37
commit 502a53fd62
6 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ data class AnimationContent(
override fun asInputMedia(): InputMediaAnimation = InputMediaAnimation(
media.fileId,
toMarkdownV2Captions().first(),
toMarkdownV2Captions().firstOrNull(),
MarkdownV2,
media.width,
media.height,

View File

@ -44,7 +44,7 @@ data class AudioContent(
override fun asInputMedia(): InputMediaAudio = InputMediaAudio(
media.fileId,
toMarkdownV2Captions().first(),
toMarkdownV2Captions().firstOrNull(),
MarkdownV2,
media.duration,
media.performer,

View File

@ -41,7 +41,7 @@ data class DocumentContent(
override fun asInputMedia(): InputMediaDocument = InputMediaDocument(
media.fileId,
toMarkdownV2Captions().first(),
toMarkdownV2Captions().firstOrNull(),
MarkdownV2,
media.thumb ?.fileId
)

View File

@ -48,7 +48,7 @@ data class PhotoContent(
override fun asInputMedia(): InputMediaPhoto = InputMediaPhoto(
media.fileId,
toMarkdownV2Captions().first(),
toMarkdownV2Captions().firstOrNull(),
MarkdownV2
)
}

View File

@ -53,7 +53,7 @@ data class VideoContent(
override fun asInputMedia(): InputMediaVideo = InputMediaVideo(
media.fileId,
toMarkdownV2Captions().first(),
toMarkdownV2Captions().firstOrNull(),
MarkdownV2,
media.width,
media.height,

View File

@ -42,7 +42,7 @@ data class VoiceContent(
override fun asInputMedia(): InputMediaAudio = InputMediaAudio(
media.fileId,
toMarkdownV2Captions().first(),
toMarkdownV2Captions().firstOrNull(),
MarkdownV2,
media.duration
)