1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 07:09:23 +00:00

real fix:)

This commit is contained in:
2020-03-30 22:52:57 +06:00
parent 55ed3e165b
commit 013944c5c9
2 changed files with 32 additions and 36 deletions

View File

@@ -7,22 +7,18 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.*
import kotlinx.serialization.*
fun SetStickerSetThumb(
stickerSetName: String,
userId: UserId,
sticker: InputFile
stickerSetName: String,
thumb: MultipartFile
): Request<Boolean> {
val data = SetStickerSetThumb(userId, stickerSetName, sticker as? FileId)
return when (sticker) {
is MultipartFile -> CommonMultipartFileRequest(
data,
mapOf(thumbField to sticker)
)
is FileId -> data
}
return CommonMultipartFileRequest(
SetStickerSetThumb(userId, stickerSetName),
mapOf(thumbField to thumb)
)
}
@Serializable
data class SetStickerSetThumb internal constructor(
data class SetStickerSetThumb (
@SerialName(userIdField)
override val userId: UserId,
@SerialName(nameField)