From 8b363f3f9402ffe64dec9a8415547fa573362aa4 Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 14 Jul 2016 09:54:43 +0200 Subject: [PATCH] Fix #6 : Chat ids could be greater than 32bit --- .../java/de/vivistra/telegrambot/model/GroupChat.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/vivistra/telegrambot/model/GroupChat.java b/src/main/java/de/vivistra/telegrambot/model/GroupChat.java index 3175f83..bdd9e69 100644 --- a/src/main/java/de/vivistra/telegrambot/model/GroupChat.java +++ b/src/main/java/de/vivistra/telegrambot/model/GroupChat.java @@ -9,7 +9,7 @@ */ public class GroupChat { // Unique identifier for this group chat - private Integer id; + private Long id; // Group name private String title; @@ -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; @@ -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); @@ -50,7 +50,7 @@ public static GroupChat fromJSON(JSONObject chatObject) { * * @return */ - public int getId() { + public long getId() { return id; }