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

Renamed extension function to reflect its functionality

This commit is contained in:
bpavuk 2024-07-10 16:53:18 +03:00
parent f89849218a
commit 613f6de483
No known key found for this signature in database
GPG Key ID: B501D26D9DEA9CFE

View File

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