serializationf for TUser
This commit is contained in:
parent
291e52dbb4
commit
facdc8635c
|
@ -180,7 +180,9 @@ public class TelegramAPI implements Runnable {
|
||||||
if(us.getID() == id)
|
if(us.getID() == id)
|
||||||
return us;
|
return us;
|
||||||
}
|
}
|
||||||
return null;
|
TUser u = new TUser(id, this);
|
||||||
|
users.add(u);
|
||||||
|
return u;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,6 +25,11 @@ public class TUser {
|
||||||
this.api = api;
|
this.api = api;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TUser(int chatid, TelegramAPI api) {
|
||||||
|
this.api = api;
|
||||||
|
this.id = chatid;
|
||||||
|
}
|
||||||
|
|
||||||
public TUser(JSONObject o, TelegramAPI api) {
|
public TUser(JSONObject o, TelegramAPI api) {
|
||||||
this.api = api;
|
this.api = api;
|
||||||
firstname = o.getString("first_name");
|
firstname = o.getString("first_name");
|
||||||
|
|
Loading…
Reference in New Issue