Skip to content

Commit c29e22d

Browse files
committed
Replaced the field can_send_gift with the field accepted_gift_types of the type AcceptedGiftTypes in the class ChatFullInfo.
1 parent 88669a9 commit c29e22d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.pengrad.telegrambot.model.business.BusinessIntro;
55
import com.pengrad.telegrambot.model.business.BusinessLocation;
66
import com.pengrad.telegrambot.model.business.BusinessOpeningHours;
7+
import com.pengrad.telegrambot.model.gift.AcceptedGiftTypes;
78
import com.pengrad.telegrambot.model.reaction.ReactionType;
89

910

@@ -71,6 +72,7 @@ public enum Type {
7172
private Long linked_chat_id;
7273
private ChatLocation location;
7374
private Boolean can_send_gift;
75+
private AcceptedGiftTypes accepted_gift_types;
7476

7577
public Long id() {
7678
return id;
@@ -247,10 +249,19 @@ public ChatLocation location() {
247249
return location;
248250
}
249251

252+
/**
253+
*
254+
* @deprecated Use 'acceptedGiftTypes' instead
255+
*/
256+
@Deprecated
250257
public Boolean canSendGift() {
251258
return can_send_gift;
252259
}
253260

261+
public AcceptedGiftTypes acceptedGiftTypes() {
262+
return accepted_gift_types;
263+
}
264+
254265
@Override
255266
public boolean equals(Object o) {
256267
if (this == o) return true;
@@ -300,7 +311,7 @@ public boolean equals(Object o) {
300311
Objects.equals(custom_emoji_sticker_set_name, chat.custom_emoji_sticker_set_name) &&
301312
Objects.equals(linked_chat_id, chat.linked_chat_id) &&
302313
Objects.equals(location, chat.location) &&
303-
Objects.equals(can_send_gift, chat.can_send_gift);
314+
Objects.equals(accepted_gift_types, chat.accepted_gift_types);
304315
}
305316

306317
@Override
@@ -355,7 +366,7 @@ public String toString() {
355366
", custom_emoji_sticker_set_name=" + custom_emoji_sticker_set_name +
356367
", linked_chat_id=" + linked_chat_id +
357368
", location=" + location +
358-
", can_send_gift=" + can_send_gift +
369+
", accepted_gift_types=" + accepted_gift_types +
359370
'}';
360371
}
361372
}

0 commit comments

Comments
 (0)