Skip to content

Commit 4e6ca81

Browse files
committed
Added the field thumb to the StickerSet object
1 parent c024488 commit 4e6ca81

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class StickerSet implements Serializable {
1515
private Boolean is_animated;
1616
private Boolean contains_masks;
1717
private Sticker[] stickers;
18+
private PhotoSize thumb;
1819

1920
public String name() {
2021
return name;
@@ -36,6 +37,10 @@ public Sticker[] stickers() {
3637
return stickers;
3738
}
3839

40+
public PhotoSize thumb() {
41+
return thumb;
42+
}
43+
3944
@Override
4045
public boolean equals(Object o) {
4146
if (this == o) return true;
@@ -46,9 +51,13 @@ public boolean equals(Object o) {
4651
if (name != null ? !name.equals(that.name) : that.name != null) return false;
4752
if (title != null ? !title.equals(that.title) : that.title != null) return false;
4853
if (is_animated != null ? !is_animated.equals(that.is_animated) : that.is_animated != null) return false;
49-
if (contains_masks != null ? !contains_masks.equals(that.contains_masks) : that.contains_masks != null) return false;
54+
if (contains_masks != null ? !contains_masks.equals(that.contains_masks) : that.contains_masks != null)
55+
return false;
5056
// Probably incorrect - comparing Object[] arrays with Arrays.equals
51-
return Arrays.equals(stickers, that.stickers);
57+
if (!Arrays.equals(stickers, that.stickers)) return false;
58+
if (thumb != null ? !thumb.equals(that.thumb) : that.thumb != null) return false;
59+
60+
return true;
5261
}
5362

5463
@Override
@@ -58,6 +67,7 @@ public int hashCode() {
5867
result = 31 * result + (is_animated != null ? is_animated.hashCode() : 0);
5968
result = 31 * result + (contains_masks != null ? contains_masks.hashCode() : 0);
6069
result = 31 * result + Arrays.hashCode(stickers);
70+
result = 31 * result + (thumb != null ? thumb.hashCode() : 0);
6171
return result;
6272
}
6373

@@ -69,6 +79,7 @@ public String toString() {
6979
", is_animated=" + is_animated +
7080
", contains_masks=" + contains_masks +
7181
", stickers=" + Arrays.toString(stickers) +
82+
", thumb=" + thumb +
7283
'}';
7384
}
7485
}

0 commit comments

Comments
 (0)