mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
fixes in new "asInputMedia" functions
This commit is contained in:
parent
353891eb37
commit
502a53fd62
@ -45,7 +45,7 @@ data class AnimationContent(
|
||||
|
||||
override fun asInputMedia(): InputMediaAnimation = InputMediaAnimation(
|
||||
media.fileId,
|
||||
toMarkdownV2Captions().first(),
|
||||
toMarkdownV2Captions().firstOrNull(),
|
||||
MarkdownV2,
|
||||
media.width,
|
||||
media.height,
|
||||
|
@ -44,7 +44,7 @@ data class AudioContent(
|
||||
|
||||
override fun asInputMedia(): InputMediaAudio = InputMediaAudio(
|
||||
media.fileId,
|
||||
toMarkdownV2Captions().first(),
|
||||
toMarkdownV2Captions().firstOrNull(),
|
||||
MarkdownV2,
|
||||
media.duration,
|
||||
media.performer,
|
||||
|
@ -41,7 +41,7 @@ data class DocumentContent(
|
||||
|
||||
override fun asInputMedia(): InputMediaDocument = InputMediaDocument(
|
||||
media.fileId,
|
||||
toMarkdownV2Captions().first(),
|
||||
toMarkdownV2Captions().firstOrNull(),
|
||||
MarkdownV2,
|
||||
media.thumb ?.fileId
|
||||
)
|
||||
|
@ -48,7 +48,7 @@ data class PhotoContent(
|
||||
|
||||
override fun asInputMedia(): InputMediaPhoto = InputMediaPhoto(
|
||||
media.fileId,
|
||||
toMarkdownV2Captions().first(),
|
||||
toMarkdownV2Captions().firstOrNull(),
|
||||
MarkdownV2
|
||||
)
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ data class VideoContent(
|
||||
|
||||
override fun asInputMedia(): InputMediaVideo = InputMediaVideo(
|
||||
media.fileId,
|
||||
toMarkdownV2Captions().first(),
|
||||
toMarkdownV2Captions().firstOrNull(),
|
||||
MarkdownV2,
|
||||
media.width,
|
||||
media.height,
|
||||
|
@ -42,7 +42,7 @@ data class VoiceContent(
|
||||
|
||||
override fun asInputMedia(): InputMediaAudio = InputMediaAudio(
|
||||
media.fileId,
|
||||
toMarkdownV2Captions().first(),
|
||||
toMarkdownV2Captions().firstOrNull(),
|
||||
MarkdownV2,
|
||||
media.duration
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user