mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +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
|
## 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
|
## 5.0.1
|
||||||
|
|
||||||
* `Versions`:
|
* `Versions`:
|
||||||
|
@ -327,7 +327,12 @@ const val scopeField = "scope"
|
|||||||
const val isMemberField = "is_member"
|
const val isMemberField = "is_member"
|
||||||
const val isForumField = "is_forum"
|
const val isForumField = "is_forum"
|
||||||
const val canSendMessagesField = "can_send_messages"
|
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 canSendOtherMessagesField = "can_send_other_messages"
|
||||||
const val canSendPollsField = "can_send_polls"
|
const val canSendPollsField = "can_send_polls"
|
||||||
const val canAddWebPagePreviewsField = "can_add_web_page_previews"
|
const val canAddWebPagePreviewsField = "can_add_web_page_previews"
|
||||||
|
@ -8,8 +8,18 @@ import kotlinx.serialization.Serializable
|
|||||||
data class ChatPermissions(
|
data class ChatPermissions(
|
||||||
@SerialName(canSendMessagesField)
|
@SerialName(canSendMessagesField)
|
||||||
val canSendMessages: Boolean = false,
|
val canSendMessages: Boolean = false,
|
||||||
@SerialName(canSendMediaMessagesField)
|
@SerialName(canSendAudiosField)
|
||||||
val canSendMediaMessages: Boolean = false,
|
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)
|
@SerialName(canSendPollsField)
|
||||||
val canSendPolls: Boolean = false,
|
val canSendPolls: Boolean = false,
|
||||||
@SerialName(canSendOtherMessagesField)
|
@SerialName(canSendOtherMessagesField)
|
||||||
@ -26,7 +36,12 @@ data class ChatPermissions(
|
|||||||
|
|
||||||
val LeftRestrictionsChatPermissions = ChatPermissions(
|
val LeftRestrictionsChatPermissions = ChatPermissions(
|
||||||
canSendMessages = true,
|
canSendMessages = true,
|
||||||
canSendMediaMessages = true,
|
canSendAudios = true,
|
||||||
|
canSendDocuments = true,
|
||||||
|
canSendPhotos = true,
|
||||||
|
canSendVideos = true,
|
||||||
|
canSendVideoNotes = true,
|
||||||
|
canSendVoiceNotes = true,
|
||||||
canSendPolls = true,
|
canSendPolls = true,
|
||||||
canSendOtherMessages = true,
|
canSendOtherMessages = true,
|
||||||
canAddWebPagePreviews = true,
|
canAddWebPagePreviews = true,
|
||||||
@ -37,7 +52,12 @@ val LeftRestrictionsChatPermissions = ChatPermissions(
|
|||||||
|
|
||||||
val RestrictionsChatPermissions = ChatPermissions(
|
val RestrictionsChatPermissions = ChatPermissions(
|
||||||
canSendMessages = false,
|
canSendMessages = false,
|
||||||
canSendMediaMessages = false,
|
canSendAudios = false,
|
||||||
|
canSendDocuments = false,
|
||||||
|
canSendPhotos = false,
|
||||||
|
canSendVideos = false,
|
||||||
|
canSendVideoNotes = false,
|
||||||
|
canSendVoiceNotes = false,
|
||||||
canSendPolls = false,
|
canSendPolls = false,
|
||||||
canSendOtherMessages = false,
|
canSendOtherMessages = false,
|
||||||
canAddWebPagePreviews = false,
|
canAddWebPagePreviews = false,
|
||||||
|
@ -14,8 +14,18 @@ data class RestrictedChatMember(
|
|||||||
val isMember: Boolean = false,
|
val isMember: Boolean = false,
|
||||||
@SerialName(canSendMessagesField)
|
@SerialName(canSendMessagesField)
|
||||||
val canSendMessages: Boolean = false,
|
val canSendMessages: Boolean = false,
|
||||||
@SerialName(canSendMediaMessagesField)
|
@SerialName(canSendAudiosField)
|
||||||
val canSendMediaMessages: Boolean = false,
|
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)
|
@SerialName(canSendPollsField)
|
||||||
val canSendPolls: Boolean = false,
|
val canSendPolls: Boolean = false,
|
||||||
@SerialName(canSendOtherMessagesField)
|
@SerialName(canSendOtherMessagesField)
|
||||||
|
Loading…
Reference in New Issue
Block a user