mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
Replaced the fields can_send_media_messages
in the classes RestrictedChatMember
and ChatPermissions
with separate fields can_send_audios
, can_send_documents
, can_send_photos
, can_send_videos
, can_send_video_notes
, and can_send_voice_notes
for different media types.
This commit is contained in:
parent
f29996aac8
commit
cd596cc66d
@ -2,6 +2,10 @@
|
||||
|
||||
## 5.1.0
|
||||
|
||||
* `Core`:
|
||||
* [Bot API 6.5](https://core.telegram.org/bots/api#february-3-2023) support
|
||||
* Replaced the fields `can_send_media_messages` in the classes `ChatMemberRestricted` and `ChatPermissions` with separate fields `can_send_audios`, `can_send_documents`, `can_send_photos`, `can_send_videos`, `can_send_video_notes`, and `can_send_voice_notes` for different media types.
|
||||
|
||||
## 5.0.1
|
||||
|
||||
* `Versions`:
|
||||
|
@ -327,7 +327,12 @@ const val scopeField = "scope"
|
||||
const val isMemberField = "is_member"
|
||||
const val isForumField = "is_forum"
|
||||
const val canSendMessagesField = "can_send_messages"
|
||||
const val canSendMediaMessagesField = "can_send_media_messages"
|
||||
const val canSendAudiosField = "can_send_audios"
|
||||
const val canSendDocumentsField = "can_send_documents"
|
||||
const val canSendPhotosField = "can_send_photos"
|
||||
const val canSendVideosField = "can_send_videos"
|
||||
const val canSendVideoNotesField = "can_send_video_notes"
|
||||
const val canSendVoiceNotesField = "can_send_voice_notes"
|
||||
const val canSendOtherMessagesField = "can_send_other_messages"
|
||||
const val canSendPollsField = "can_send_polls"
|
||||
const val canAddWebPagePreviewsField = "can_add_web_page_previews"
|
||||
|
@ -8,8 +8,18 @@ import kotlinx.serialization.Serializable
|
||||
data class ChatPermissions(
|
||||
@SerialName(canSendMessagesField)
|
||||
val canSendMessages: Boolean = false,
|
||||
@SerialName(canSendMediaMessagesField)
|
||||
val canSendMediaMessages: Boolean = false,
|
||||
@SerialName(canSendAudiosField)
|
||||
val canSendAudios: Boolean = false,
|
||||
@SerialName(canSendDocumentsField)
|
||||
val canSendDocuments: Boolean = false,
|
||||
@SerialName(canSendPhotosField)
|
||||
val canSendPhotos: Boolean = false,
|
||||
@SerialName(canSendVideosField)
|
||||
val canSendVideos: Boolean = false,
|
||||
@SerialName(canSendVideoNotesField)
|
||||
val canSendVideoNotes: Boolean = false,
|
||||
@SerialName(canSendVoiceNotesField)
|
||||
val canSendVoiceNotes: Boolean = false,
|
||||
@SerialName(canSendPollsField)
|
||||
val canSendPolls: Boolean = false,
|
||||
@SerialName(canSendOtherMessagesField)
|
||||
@ -26,7 +36,12 @@ data class ChatPermissions(
|
||||
|
||||
val LeftRestrictionsChatPermissions = ChatPermissions(
|
||||
canSendMessages = true,
|
||||
canSendMediaMessages = true,
|
||||
canSendAudios = true,
|
||||
canSendDocuments = true,
|
||||
canSendPhotos = true,
|
||||
canSendVideos = true,
|
||||
canSendVideoNotes = true,
|
||||
canSendVoiceNotes = true,
|
||||
canSendPolls = true,
|
||||
canSendOtherMessages = true,
|
||||
canAddWebPagePreviews = true,
|
||||
@ -37,7 +52,12 @@ val LeftRestrictionsChatPermissions = ChatPermissions(
|
||||
|
||||
val RestrictionsChatPermissions = ChatPermissions(
|
||||
canSendMessages = false,
|
||||
canSendMediaMessages = false,
|
||||
canSendAudios = false,
|
||||
canSendDocuments = false,
|
||||
canSendPhotos = false,
|
||||
canSendVideos = false,
|
||||
canSendVideoNotes = false,
|
||||
canSendVoiceNotes = false,
|
||||
canSendPolls = false,
|
||||
canSendOtherMessages = false,
|
||||
canAddWebPagePreviews = false,
|
||||
|
@ -14,8 +14,18 @@ data class RestrictedChatMember(
|
||||
val isMember: Boolean = false,
|
||||
@SerialName(canSendMessagesField)
|
||||
val canSendMessages: Boolean = false,
|
||||
@SerialName(canSendMediaMessagesField)
|
||||
val canSendMediaMessages: Boolean = false,
|
||||
@SerialName(canSendAudiosField)
|
||||
val canSendAudios: Boolean = false,
|
||||
@SerialName(canSendDocumentsField)
|
||||
val canSendDocuments: Boolean = false,
|
||||
@SerialName(canSendPhotosField)
|
||||
val canSendPhotos: Boolean = false,
|
||||
@SerialName(canSendVideosField)
|
||||
val canSendVideos: Boolean = false,
|
||||
@SerialName(canSendVideoNotesField)
|
||||
val canSendVideoNotes: Boolean = false,
|
||||
@SerialName(canSendVoiceNotesField)
|
||||
val canSendVoiceNotes: Boolean = false,
|
||||
@SerialName(canSendPollsField)
|
||||
val canSendPolls: Boolean = false,
|
||||
@SerialName(canSendOtherMessagesField)
|
||||
|
Loading…
Reference in New Issue
Block a user