serializationf for TUser

This commit is contained in:
mrbesen 2019-02-05 20:49:35 +01:00
parent 291e52dbb4
commit facdc8635c
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
2 changed files with 8 additions and 1 deletions

View File

@ -180,7 +180,9 @@ public class TelegramAPI implements Runnable {
if(us.getID() == id)
return us;
}
return null;
TUser u = new TUser(id, this);
users.add(u);
return u;
}
/**

View File

@ -25,6 +25,11 @@ public class TUser {
this.api = api;
}
public TUser(int chatid, TelegramAPI api) {
this.api = api;
this.id = chatid;
}
public TUser(JSONObject o, TelegramAPI api) {
this.api = api;
firstname = o.getString("first_name");