1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 00:03:48 +00:00

updated PaidMedia.Video.toTelegramPaidMediaVideo() converter function

This commit is contained in:
bpavuk 2024-07-10 18:31:08 +03:00
parent f2fae9184f
commit 26b864a314
No known key found for this signature in database
GPG Key ID: B501D26D9DEA9CFE

View File

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