Skip to content

Commit 220448e

Browse files
committed
Added the field custom_title to the ChatMember object
1 parent 76d2084 commit 220448e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public enum Status {
1616
private User user;
1717
private Status status;
1818

19+
private String custom_title;
1920
private Integer until_date;
2021
private Boolean can_be_edited;
2122
private Boolean can_post_messages;
@@ -41,6 +42,10 @@ public Status status() {
4142
return status;
4243
}
4344

45+
public String customTitle() {
46+
return custom_title;
47+
}
48+
4449
public Integer untilDate() {
4550
return until_date;
4651
}
@@ -114,6 +119,7 @@ public boolean equals(Object o) {
114119

115120
if (user != null ? !user.equals(that.user) : that.user != null) return false;
116121
if (status != that.status) return false;
122+
if (custom_title != null ? !custom_title.equals(that.custom_title) : that.custom_title != null) return false;
117123
if (until_date != null ? !until_date.equals(that.until_date) : that.until_date != null) return false;
118124
if (can_be_edited != null ? !can_be_edited.equals(that.can_be_edited) : that.can_be_edited != null) return false;
119125
if (can_post_messages != null ? !can_post_messages.equals(that.can_post_messages) : that.can_post_messages != null)
@@ -147,6 +153,7 @@ public boolean equals(Object o) {
147153
public int hashCode() {
148154
int result = user != null ? user.hashCode() : 0;
149155
result = 31 * result + (status != null ? status.hashCode() : 0);
156+
result = 31 * result + (custom_title != null ? custom_title.hashCode() : 0);
150157
result = 31 * result + (until_date != null ? until_date.hashCode() : 0);
151158
result = 31 * result + (can_be_edited != null ? can_be_edited.hashCode() : 0);
152159
result = 31 * result + (can_post_messages != null ? can_post_messages.hashCode() : 0);
@@ -171,6 +178,7 @@ public String toString() {
171178
return "ChatMember{" +
172179
"user=" + user +
173180
", status=" + status +
181+
", custom_title='" + custom_title + '\'' +
174182
", until_date=" + until_date +
175183
", can_be_edited=" + can_be_edited +
176184
", can_post_messages=" + can_post_messages +

0 commit comments

Comments
 (0)