fixed messages issue
This commit is contained in:
@@ -9,7 +9,7 @@ import ru.vtosters.lite.utils.AndroidUtils;
|
||||
import ru.vtosters.lite.utils.LifecycleUtils;
|
||||
|
||||
public class BannerHook {
|
||||
public static JSONObject convBar(JSONObject orig) throws JSONException {
|
||||
public static JSONObject convBar(JSONObject orig) {
|
||||
return ImBanner.convBar(orig);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,11 @@ import org.json.JSONObject;
|
||||
public class ImBanner {
|
||||
private static final String TAG = "ImBanner";
|
||||
|
||||
public static JSONObject convBar(JSONObject orig) throws JSONException {
|
||||
var user_id = orig.getJSONObject("peer").getInt("id");
|
||||
public static JSONObject convBar(JSONObject orig) {
|
||||
var user = orig.optJSONObject("peer");
|
||||
var user_id = user != null ? user.optInt("id") : 0;
|
||||
|
||||
if (!UsersList.hasBanner(user_id) || user_id == 0) {
|
||||
if (user_id == 0 || !UsersList.hasBanner(user_id)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user