Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
Fix #6 : Chat ids could be greater than 32bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel committed Jul 14, 2016
1 parent a4d19bf commit 8b363f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/de/vivistra/telegrambot/model/GroupChat.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
public class GroupChat {
// Unique identifier for this group chat
private Integer id;
private Long id;
// Group name
private String title;

Expand All @@ -19,7 +19,7 @@ public class GroupChat {
* @param id
* @param title
*/
public GroupChat(int id, String title) {
public GroupChat(long id, String title) {
Assert.notEmpty(title);

this.id = id;
Expand All @@ -39,7 +39,7 @@ public static GroupChat fromJSON(JSONObject chatObject) {
return null;
}

Integer id = chatObject.getInt("id");
Long id = chatObject.getLong("id");
String title = chatObject.getString("title");

return new GroupChat(id, title);
Expand All @@ -50,7 +50,7 @@ public static GroupChat fromJSON(JSONObject chatObject) {
*
* @return
*/
public int getId() {
public long getId() {
return id;
}

Expand Down

0 comments on commit 8b363f3

Please sign in to comment.