1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +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( override fun asInputMedia(): InputMediaAnimation = InputMediaAnimation(
media.fileId, media.fileId,
toMarkdownV2Captions().first(), toMarkdownV2Captions().firstOrNull(),
MarkdownV2, MarkdownV2,
media.width, media.width,
media.height, media.height,

View File

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

View File

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

View File

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

View File

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

View File

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