fixes in new "asInputMedia" functions

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

No files matched your search

@@ -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
)