From 26b864a314cd457328c701600570f882e67eba02 Mon Sep 17 00:00:00 2001 From: bpavuk Date: Wed, 10 Jul 2024 18:31:08 +0300 Subject: [PATCH] updated PaidMedia.Video.toTelegramPaidMediaVideo() converter function --- .../types/message/payments/PaidMediaToTelegramPaidMedia.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/payments/PaidMediaToTelegramPaidMedia.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/payments/PaidMediaToTelegramPaidMedia.kt index df1cd4d90a..f9222f6af9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/payments/PaidMediaToTelegramPaidMedia.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/payments/PaidMediaToTelegramPaidMedia.kt @@ -16,7 +16,10 @@ fun PaidMedia.toTelegramPaidMediaOrNull(): TelegramPaidMedia? = when (this) { fun PaidMedia.Video.toTelegramPaidMediaVideo(): TelegramPaidMediaVideo = TelegramPaidMediaVideo( file = this.video.fileId, - duration = this.video.duration + duration = this.video.duration, + width = this.video.width, + height = this.video.height, + thumb = this.video.thumbnail?.fileId ) fun PaidMedia.Photo.toTelegramMediaPhoto(): TelegramPaidMediaPhoto = TelegramPaidMediaPhoto(