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

medagroupcontent is media content

This commit is contained in:
InsanusMokrassar 2019-04-04 19:32:47 +08:00
parent 4ff13e0fc9
commit ac39032f50
4 changed files with 6 additions and 3 deletions

View File

@ -64,6 +64,8 @@ of `]` in links titles
### 0.12.5
* Now `MediaGroupContent` is `MediaContent`
## 0.11.0
* Kotlin `1.3.11` -> `1.3.21`

View File

@ -1,7 +1,8 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.MediaGroupMemberInputMedia
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.TelegramMediaFile
interface MediaGroupContent : MessageContent {
interface MediaGroupContent<T : TelegramMediaFile> : MediaContent<T>, MessageContent {
fun toMediaGroupMemberInputMedia(): MediaGroupMemberInputMedia
}

View File

@ -19,7 +19,7 @@ data class PhotoContent(
override val mediaCollection: List<PhotoSize>,
override val caption: String? = null,
override val captionEntities: List<MessageEntity> = emptyList()
) : MediaCollectionContent<PhotoSize>, CaptionedMediaContent, MediaGroupContent {
) : MediaCollectionContent<PhotoSize>, CaptionedMediaContent, MediaGroupContent<PhotoSize> {
override val media: PhotoSize = mediaCollection.biggest() ?: throw IllegalStateException("Can't locate any photo size for this content")
override fun createResend(

View File

@ -18,7 +18,7 @@ data class VideoContent(
override val media: VideoFile,
override val caption: String? = null,
override val captionEntities: List<MessageEntity> = emptyList()
) : MediaContent<VideoFile>, CaptionedMediaContent, MediaGroupContent {
) : CaptionedMediaContent, MediaGroupContent<VideoFile> {
override fun createResend(
chatId: ChatIdentifier,
disableNotification: Boolean,