Skip to content

BOT API v7.8 #392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
<dependency>
<groupId>com.github.pengrad</groupId>
<artifactId>java-telegram-bot-api</artifactId>
<version>7.7.0</version>
<version>7.8.0</version>
</dependency>
```
[JAR with all dependencies on release page](https://github.com/pengrad/java-telegram-bot-api/releases)
Expand Down
6 changes: 3 additions & 3 deletions README_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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
<dependency>
<groupId>com.github.pengrad</groupId>
<artifactId>java-telegram-bot-api</artifactId>
<version>7.7.0</version>
<version>7.8.0</version>
</dependency>
```
Также JAR со всеми зависимостями можно найти [в релизах](https://github.com/pengrad/java-telegram-bot-api/releases).
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
}
Expand Down Expand Up @@ -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
Expand All @@ -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 +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
Expand All @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.pengrad</groupId>
<artifactId>java-telegram-bot-api</artifactId>
<version>7.7.0</version>
<version>7.8.0</version>
<name>JavaTelegramBotApi</name>
<description>Java API for Telegram Bot API</description>
<url>https://github.com/pengrad/java-telegram-bot-api/</url>
Expand Down