1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

fix of return type in SendMediaGroup and fill changelog

This commit is contained in:
InsanusMokrassar 2023-01-14 22:09:27 +06:00
parent 4cd8e823c6
commit e40548e558
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
# TelegramBotAPI changelog
## 5.0.1
* `Core`:
* Fixes in `SendMediaGroup` request
* Fixes in `SetChatAdministratorCustomTitle` request (thanks to [@madhead](https://github.com/madhead))
## 5.0.0
[Bot API 6.4](https://core.telegram.org/bots/api-changelog#december-30-2022) support!

View File

@ -37,7 +37,7 @@ fun <T : MediaGroupPartContent> SendMediaGroup(
protectContent: Boolean = false,
replyToMessageId: MessageId? = null,
allowSendingWithoutReply: Boolean? = null
): Request<PossiblySentViaBotCommonMessage<T>> {
): Request<PossiblySentViaBotCommonMessage<MediaGroupContent<T>>> {
if (media.size !in mediaCountInMediaGroup) {
throwRangeError("Count of members in media group", mediaCountInMediaGroup, media.size)
}
@ -70,7 +70,7 @@ fun <T : MediaGroupPartContent> SendMediaGroup(
data,
SendMediaGroupFiles(files)
)
}) as Request<PossiblySentViaBotCommonMessage<T>>
}) as Request<PossiblySentViaBotCommonMessage<MediaGroupContent<T>>>
}
/**