Skip to content

Commit dcb52ff

Browse files
authored
Merge pull request #392 from mircoianese/api_v7.8
BOT API v7.8
2 parents 815d772 + 4605c07 commit dcb52ff

File tree

7 files changed

+23
-10
lines changed

7 files changed

+23
-10
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![codecov](https://codecov.io/gh/pengrad/java-telegram-bot-api/branch/master/graph/badge.svg)](https://codecov.io/gh/pengrad/java-telegram-bot-api)
55

66
Java library for interacting with [Telegram Bot API](https://core.telegram.org/bots/api)
7-
- Full support of all Bot API 7.2 methods
7+
- Full support of all Bot API 7.8 methods
88
- Telegram [Passport](https://core.telegram.org/passport) and Decryption API
99
- Bot [Payments](https://core.telegram.org/bots/payments)
1010
- [Gaming Platform](https://telegram.org/blog/games)
@@ -13,14 +13,14 @@ Java library for interacting with [Telegram Bot API](https://core.telegram.org/b
1313

1414
Gradle:
1515
```groovy
16-
implementation 'com.github.pengrad:java-telegram-bot-api:7.7.0'
16+
implementation 'com.github.pengrad:java-telegram-bot-api:7.8.0'
1717
```
1818
Maven:
1919
```xml
2020
<dependency>
2121
<groupId>com.github.pengrad</groupId>
2222
<artifactId>java-telegram-bot-api</artifactId>
23-
<version>7.7.0</version>
23+
<version>7.8.0</version>
2424
</dependency>
2525
```
2626
[JAR with all dependencies on release page](https://github.com/pengrad/java-telegram-bot-api/releases)

README_RU.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![codecov](https://codecov.io/gh/pengrad/java-telegram-bot-api/branch/master/graph/badge.svg)](https://codecov.io/gh/pengrad/java-telegram-bot-api)
55

66
Java библиотека, созданная для работы с [Telegram Bot API](https://core.telegram.org/bots/api)
7-
- Полная поддержка всех методов BOT API 7.2
7+
- Полная поддержка всех методов BOT API 7.8
88
- Поддержка Telegram [паспорта](https://core.telegram.org/passport) и дешифровки (Decryption API);
99
- Поддержка [платежей](https://core.telegram.org/bots/payments);
1010
- [Игровая платформа](https://telegram.org/blog/games).
@@ -13,14 +13,14 @@ Java библиотека, созданная для работы с [Telegram B
1313

1414
Gradle:
1515
```groovy
16-
implementation 'com.github.pengrad:java-telegram-bot-api:7.7.0'
16+
implementation 'com.github.pengrad:java-telegram-bot-api:7.8.0'
1717
```
1818
Maven:
1919
```xml
2020
<dependency>
2121
<groupId>com.github.pengrad</groupId>
2222
<artifactId>java-telegram-bot-api</artifactId>
23-
<version>7.7.0</version>
23+
<version>7.8.0</version>
2424
</dependency>
2525
```
2626
Также JAR со всеми зависимостями можно найти [в релизах](https://github.com/pengrad/java-telegram-bot-api/releases).

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.github.pengrad
2-
VERSION_NAME=7.7.0
2+
VERSION_NAME=7.8.0
33

44
POM_DESCRIPTION=Java API for Telegram Bot API
55
POM_URL=https://github.com/pengrad/java-telegram-bot-api/

library/src/main/java/com/pengrad/telegrambot/model/User.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class User implements Serializable {
2222
private Boolean can_read_all_group_messages;
2323
private Boolean supports_inline_queries;
2424
private Boolean can_connect_to_business;
25+
private Boolean has_main_web_app;
2526

2627
private User() {
2728
}
@@ -78,12 +79,16 @@ public Boolean canConnectToBusiness() {
7879
return can_connect_to_business != null && can_connect_to_business;
7980
}
8081

82+
public Boolean hasMainWebApp() {
83+
return has_main_web_app;
84+
}
85+
8186
@Override
8287
public boolean equals(Object o) {
8388
if (this == o) return true;
8489
if (o == null || getClass() != o.getClass()) return false;
8590
User user = (User) o;
86-
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);
91+
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);
8792
}
8893

8994
@Override
@@ -106,6 +111,7 @@ public String toString() {
106111
", can_read_all_group_messages=" + can_read_all_group_messages +
107112
", supports_inline_queries=" + supports_inline_queries +
108113
", can_connect_to_business=" + can_connect_to_business +
114+
", has_main_web_app=" + has_main_web_app +
109115
'}';
110116
}
111117
}

library/src/main/java/com/pengrad/telegrambot/request/PinChatMessage.java

+3
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ public PinChatMessage(Object chatId, int messageId) {
1616
public PinChatMessage disableNotification(boolean disableNotification) {
1717
return add("disable_notification", disableNotification);
1818
}
19+
public PinChatMessage businessConnectionId(String businessConnectionId) {
20+
return add("business_connection_id", businessConnectionId);
21+
}
1922

2023
}

library/src/main/java/com/pengrad/telegrambot/request/UnpinChatMessage.java

+4
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ public UnpinChatMessage(Object chatId) {
1616
public UnpinChatMessage messageId(Integer messageId) {
1717
return add("message_id", messageId);
1818
}
19+
20+
public UnpinChatMessage businessConnectionId(String businessConnectionId) {
21+
return add("business_connection_id", businessConnectionId);
22+
}
1923
}

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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"
2+
<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"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<!-- This module was also published with a richer model, Gradle metadata, -->
55
<!-- which should be used instead. Do not delete the following line which -->
@@ -9,7 +9,7 @@
99
<modelVersion>4.0.0</modelVersion>
1010
<groupId>com.github.pengrad</groupId>
1111
<artifactId>java-telegram-bot-api</artifactId>
12-
<version>7.7.0</version>
12+
<version>7.8.0</version>
1313
<name>JavaTelegramBotApi</name>
1414
<description>Java API for Telegram Bot API</description>
1515
<url>https://github.com/pengrad/java-telegram-bot-api/</url>

0 commit comments

Comments
 (0)