From 613f6de483342c9927e9e7677471ab822ffa7d23 Mon Sep 17 00:00:00 2001 From: bpavuk Date: Wed, 10 Jul 2024 16:53:18 +0300 Subject: [PATCH] Renamed extension function to reflect its functionality --- .../types/message/payments/PaidMediaToTelegramPaidMedia.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 84be904eb6..df1cd4d90a 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 @@ -1,11 +1,10 @@ package dev.inmo.tgbotapi.types.message.payments -import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto import dev.inmo.tgbotapi.types.media.TelegramPaidMedia import dev.inmo.tgbotapi.types.media.TelegramPaidMediaPhoto import dev.inmo.tgbotapi.types.media.TelegramPaidMediaVideo -fun PaidMedia.toTelegramPaidMedia(): TelegramPaidMedia? = when (this) { +fun PaidMedia.toTelegramPaidMediaOrNull(): TelegramPaidMedia? = when (this) { is PaidMedia.Photo -> TelegramPaidMediaPhoto( file = this.photo.biggest.fileId )