From dc795bcc42aa6af1a208f380b0a3a69607b4c755 Mon Sep 17 00:00:00 2001 From: Mirco Ianese Date: Thu, 1 Aug 2024 09:17:06 +0200 Subject: [PATCH 1/3] Added the field has_main_web_app to the class User --- .../src/main/java/com/pengrad/telegrambot/model/User.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/pengrad/telegrambot/model/User.java b/library/src/main/java/com/pengrad/telegrambot/model/User.java index 9aa5cecf..c3ac2141 100644 --- a/library/src/main/java/com/pengrad/telegrambot/model/User.java +++ b/library/src/main/java/com/pengrad/telegrambot/model/User.java @@ -22,6 +22,7 @@ public class User implements Serializable { private Boolean can_read_all_group_messages; private Boolean supports_inline_queries; private Boolean can_connect_to_business; + private Boolean has_main_web_app; private User() { } @@ -78,12 +79,16 @@ public Boolean canConnectToBusiness() { return can_connect_to_business != null && can_connect_to_business; } + public Boolean hasMainWebApp() { + return has_main_web_app; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; - return Objects.equals(id, user.id) && Objects.equals(is_bot, user.is_bot) && Objects.equals(first_name, user.first_name) && Objects.equals(last_name, user.last_name) && Objects.equals(username, user.username) && Objects.equals(language_code, user.language_code) && Objects.equals(is_premium, user.is_premium) && Objects.equals(added_to_attachment_menu, user.added_to_attachment_menu) && Objects.equals(can_join_groups, user.can_join_groups) && Objects.equals(can_read_all_group_messages, user.can_read_all_group_messages) && Objects.equals(supports_inline_queries, user.supports_inline_queries) && Objects.equals(can_connect_to_business, user.can_connect_to_business); + return Objects.equals(id, user.id) && Objects.equals(is_bot, user.is_bot) && Objects.equals(first_name, user.first_name) && Objects.equals(last_name, user.last_name) && Objects.equals(username, user.username) && Objects.equals(language_code, user.language_code) && Objects.equals(is_premium, user.is_premium) && Objects.equals(added_to_attachment_menu, user.added_to_attachment_menu) && Objects.equals(can_join_groups, user.can_join_groups) && Objects.equals(can_read_all_group_messages, user.can_read_all_group_messages) && Objects.equals(supports_inline_queries, user.supports_inline_queries) && Objects.equals(can_connect_to_business, user.can_connect_to_business) && Objects.equals(has_main_web_app, user.has_main_web_app); } @Override @@ -106,6 +111,7 @@ public String toString() { ", can_read_all_group_messages=" + can_read_all_group_messages + ", supports_inline_queries=" + supports_inline_queries + ", can_connect_to_business=" + can_connect_to_business + + ", has_main_web_app=" + has_main_web_app + '}'; } } \ No newline at end of file From f8c5067d3b3d5a579f3e77c91adc565352118215 Mon Sep 17 00:00:00 2001 From: Mirco Ianese Date: Thu, 1 Aug 2024 09:18:29 +0200 Subject: [PATCH 2/3] Added the parameter business_connection_id to the methods pinChatMessage and unpinChatMessage --- .../java/com/pengrad/telegrambot/request/PinChatMessage.java | 3 +++ .../com/pengrad/telegrambot/request/UnpinChatMessage.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/library/src/main/java/com/pengrad/telegrambot/request/PinChatMessage.java b/library/src/main/java/com/pengrad/telegrambot/request/PinChatMessage.java index 1abe826d..a691bf40 100644 --- a/library/src/main/java/com/pengrad/telegrambot/request/PinChatMessage.java +++ b/library/src/main/java/com/pengrad/telegrambot/request/PinChatMessage.java @@ -16,5 +16,8 @@ public PinChatMessage(Object chatId, int messageId) { public PinChatMessage disableNotification(boolean disableNotification) { return add("disable_notification", disableNotification); } + public PinChatMessage businessConnectionId(String businessConnectionId) { + return add("business_connection_id", businessConnectionId); + } } diff --git a/library/src/main/java/com/pengrad/telegrambot/request/UnpinChatMessage.java b/library/src/main/java/com/pengrad/telegrambot/request/UnpinChatMessage.java index 84b3cf7e..4eedfa74 100644 --- a/library/src/main/java/com/pengrad/telegrambot/request/UnpinChatMessage.java +++ b/library/src/main/java/com/pengrad/telegrambot/request/UnpinChatMessage.java @@ -16,4 +16,8 @@ public UnpinChatMessage(Object chatId) { public UnpinChatMessage messageId(Integer messageId) { return add("message_id", messageId); } + + public UnpinChatMessage businessConnectionId(String businessConnectionId) { + return add("business_connection_id", businessConnectionId); + } } From 4605c07a0bc634b3ca7891674a55ed10148536bb Mon Sep 17 00:00:00 2001 From: Mirco Ianese Date: Thu, 1 Aug 2024 09:20:16 +0200 Subject: [PATCH 3/3] Bump to v7.8 --- README.md | 6 +++--- README_RU.md | 6 +++--- gradle.properties | 2 +- pom.xml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d103872c..1efbb193 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![codecov](https://codecov.io/gh/pengrad/java-telegram-bot-api/branch/master/graph/badge.svg)](https://codecov.io/gh/pengrad/java-telegram-bot-api) Java library for interacting with [Telegram Bot API](https://core.telegram.org/bots/api) -- Full support of all Bot API 7.2 methods +- Full support of all Bot API 7.8 methods - Telegram [Passport](https://core.telegram.org/passport) and Decryption API - Bot [Payments](https://core.telegram.org/bots/payments) - [Gaming Platform](https://telegram.org/blog/games) @@ -13,14 +13,14 @@ Java library for interacting with [Telegram Bot API](https://core.telegram.org/b Gradle: ```groovy -implementation 'com.github.pengrad:java-telegram-bot-api:7.7.0' +implementation 'com.github.pengrad:java-telegram-bot-api:7.8.0' ``` Maven: ```xml com.github.pengrad java-telegram-bot-api - 7.7.0 + 7.8.0 ``` [JAR with all dependencies on release page](https://github.com/pengrad/java-telegram-bot-api/releases) diff --git a/README_RU.md b/README_RU.md index 01dfb343..441cb57b 100644 --- a/README_RU.md +++ b/README_RU.md @@ -4,7 +4,7 @@ [![codecov](https://codecov.io/gh/pengrad/java-telegram-bot-api/branch/master/graph/badge.svg)](https://codecov.io/gh/pengrad/java-telegram-bot-api) Java библиотека, созданная для работы с [Telegram Bot API](https://core.telegram.org/bots/api) -- Полная поддержка всех методов BOT API 7.2 +- Полная поддержка всех методов BOT API 7.8 - Поддержка Telegram [паспорта](https://core.telegram.org/passport) и дешифровки (Decryption API); - Поддержка [платежей](https://core.telegram.org/bots/payments); - [Игровая платформа](https://telegram.org/blog/games). @@ -13,14 +13,14 @@ Java библиотека, созданная для работы с [Telegram B Gradle: ```groovy -implementation 'com.github.pengrad:java-telegram-bot-api:7.7.0' +implementation 'com.github.pengrad:java-telegram-bot-api:7.8.0' ``` Maven: ```xml com.github.pengrad java-telegram-bot-api - 7.7.0 + 7.8.0 ``` Также JAR со всеми зависимостями можно найти [в релизах](https://github.com/pengrad/java-telegram-bot-api/releases). diff --git a/gradle.properties b/gradle.properties index 865d7b10..a28484c3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.github.pengrad -VERSION_NAME=7.7.0 +VERSION_NAME=7.8.0 POM_DESCRIPTION=Java API for Telegram Bot API POM_URL=https://github.com/pengrad/java-telegram-bot-api/ diff --git a/pom.xml b/pom.xml index ecb4fd8b..26934497 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,5 @@ - @@ -9,7 +9,7 @@ 4.0.0 com.github.pengrad java-telegram-bot-api - 7.7.0 + 7.8.0 JavaTelegramBotApi Java API for Telegram Bot API https://github.com/pengrad/java-telegram-bot-api/