Group chats now have a description

This commit is contained in:
InsanusMokrassar 2019-08-12 14:15:06 +06:00
parent 8fbda09d24
commit c47c82ac43
5 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@ Changes according to [July 29, 2019 Telegram Bot API update](https://core.telegr
* `SpecialRightsChatMember` was added for administrators and restricted members rights union, chat members abstractions * `SpecialRightsChatMember` was added for administrators and restricted members rights union, chat members abstractions
was replaced into `abstracts` package and available permissions was updated was replaced into `abstracts` package and available permissions was updated
* `RestrictChatMember` request now accept `permissions` object instead of separated permissions * `RestrictChatMember` request now accept `permissions` object instead of separated permissions
* All `GroupChat` instances have description
## 0.16.0 Bot API 4.3 ## 0.16.0 Bot API 4.3

View File

@ -8,6 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
data class GroupChatImpl( data class GroupChatImpl(
override val id: ChatId, override val id: ChatId,
override val title: String? = null, override val title: String? = null,
override val description: String? = null,
override val inviteLink: String? = null, override val inviteLink: String? = null,
override val chatPhoto: ChatPhoto? = null, override val chatPhoto: ChatPhoto? = null,
override val pinnedMessage: RawMessage? = null, override val pinnedMessage: RawMessage? = null,

View File

@ -29,6 +29,7 @@ data class RawChat(
"group" -> GroupChatImpl( "group" -> GroupChatImpl(
id, id,
title, title,
description,
invite_link, invite_link,
chatPhoto, chatPhoto,
pinned_message, pinned_message,

View File

@ -16,4 +16,4 @@ data class SupergroupChat(
val stickerSetName: String? = null, val stickerSetName: String? = null,
val canSetStickerSet: Boolean = false, val canSetStickerSet: Boolean = false,
override val permissions: ChatPermissions? = null override val permissions: ChatPermissions? = null
) : GroupChat, UsernameChat, DescriptionChat ) : GroupChat, UsernameChat

View File

@ -2,6 +2,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions
interface GroupChat : PublicChat { interface GroupChat : PublicChat, DescriptionChat {
val permissions: ChatPermissions? val permissions: ChatPermissions?
} }