From c6dbe717a307263e1119943b5ed1162ed3dd4e00 Mon Sep 17 00:00:00 2001 From: Ruben Date: Tue, 1 Feb 2022 23:02:26 +0000 Subject: [PATCH 1/2] Api Version 5.7 --- TelegramBots.wiki/Changelog.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TelegramBots.wiki/Changelog.md b/TelegramBots.wiki/Changelog.md index 58d149a2..b59c0eca 100644 --- a/TelegramBots.wiki/Changelog.md +++ b/TelegramBots.wiki/Changelog.md @@ -1,6 +1,7 @@ ### 5.7.1 ### 1. Update Api version [5.7](https://core.telegram.org/bots/api-changelog#january-31-2022) -2. Bug Fixing: #1023 +2. Spring boot 2.5.8 +3. Bug Fixing: #1023 ### 5.6.0 ### 1. Update Api version [5.6](https://core.telegram.org/bots/api-changelog#december-30-2021) From 302bf905155ec8444cd02268ebb7dcc2a4ec4da4 Mon Sep 17 00:00:00 2001 From: Ruben Date: Sat, 26 Feb 2022 20:03:10 +0000 Subject: [PATCH 2/2] #1036 --- .../telegrambots/meta/api/objects/Chat.java | 25 +++++++------------ .../meta/api/objects/Message.java | 6 ++--- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Chat.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Chat.java index 73ca0ad3..62e0f966 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Chat.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Chat.java @@ -34,7 +34,6 @@ public class Chat implements BotApiObject { private static final String FIRSTNAME_FIELD = "first_name"; private static final String LASTNAME_FIELD = "last_name"; private static final String BIO_FIELD = "bio"; - private static final String ALL_MEMBERS_ARE_ADMINISTRATORS_FIELD = "all_members_are_administrators"; private static final String PHOTO_FIELD = "photo"; private static final String DESCRIPTION_FIELD = "description"; private static final String INVITELINK_FIELD = "invite_link"; @@ -46,8 +45,8 @@ public class Chat implements BotApiObject { private static final String LINKEDCHATID_FIELD = "linked_chat_id"; private static final String LOCATION_FIELD = "location"; private static final String MESSAGEAUTODELETETIME_FIELD = "message_auto_delete_time"; - private static final String ALLOWSAVINGCONTENT_FIELD = "allow_saving_content"; private static final String HASPRIVATEFORWARDS_FIELD = "has_private_forwards"; + private static final String HASPROTECTEDCONTENT_FIELD = "has_protected_content"; private static final String USERCHATTYPE = "private"; private static final String GROUPCHATTYPE = "group"; @@ -74,11 +73,6 @@ public class Chat implements BotApiObject { private String lastName; ///< Optional. Interlocutor's first name for private chats @JsonProperty(USERNAME_FIELD) private String userName; ///< Optional. Interlocutor's last name for private chats - /** - * Optional. True if a group has ‘All Members Are Admins’ enabled. - */ - @JsonProperty(ALL_MEMBERS_ARE_ADMINISTRATORS_FIELD) - private Boolean allMembersAreAdministrators; @JsonProperty(PHOTO_FIELD) private ChatPhoto photo; ///< Optional. Chat photo. Returned only in getChat. @JsonProperty(DESCRIPTION_FIELD) @@ -120,19 +114,18 @@ public class Chat implements BotApiObject { private Integer messageAutoDeleteTime; ///< Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat. /** * Optional. - * True, if messages from the chat can be forwarded to other chats. - * Returned only in getChat. - */ - @JsonProperty(ALLOWSAVINGCONTENT_FIELD) - private Boolean allowSavingContent; - /** - * Optional. - * True, if privacy settings of the other party in the private chat allows to use tg://user?id= - * links only in chats with the user. + * True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. * Returned only in getChat. */ @JsonProperty(HASPRIVATEFORWARDS_FIELD) private Boolean hasPrivateForwards; + /** + * Optional. + * True, if messages from the chat can't be forwarded to other chats. + * Returned only in getChat. + */ + @JsonProperty(HASPROTECTEDCONTENT_FIELD) + private Boolean HasProtectedContent; @JsonIgnore public Boolean isGroupChat() { diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java index bbedba05..27ec0313 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java @@ -94,7 +94,7 @@ public class Message implements BotApiObject { private static final String VOICECHATPARTICIPANTSINVITED_FIELD = "voice_chat_participants_invited"; private static final String VOICECHATSCHEDULED_FIELD = "voice_chat_scheduled"; private static final String ISAUTOMATICFORWARD_FIELD = "is_automatic_forward"; - private static final String CANBEFORWARDED_FIELD = "can_be_forwarded"; + private static final String HASPROTECTEDCONTENT_FIELD = "has_protected_content"; @JsonProperty(MESSAGEID_FIELD) private Integer messageId; ///< Integer Unique message identifier @@ -278,8 +278,8 @@ public class Message implements BotApiObject { * True, if the message is a channel post that was automatically forwarded to the connected discussion group */ private Boolean isAutomaticForward; - @JsonProperty(CANBEFORWARDED_FIELD) - private Boolean canBeForwarded; ///< Optional. True, if the message can be forwarded + @JsonProperty(HASPROTECTEDCONTENT_FIELD) + private Boolean hasProtectedContent; ///< Optional. True, if the message can't be forwarded public List getEntities() {