Commit 7b7c12b5 authored by ano95's avatar ano95

Backwards compatibility

parent 4fbc6dcc
...@@ -164,8 +164,13 @@ public class UsersOfRoomDialogFragment extends AbstractChatRoomDialogFragment { ...@@ -164,8 +164,13 @@ public class UsersOfRoomDialogFragment extends AbstractChatRoomDialogFragment {
JSONArray array = new JSONArray(procedure.getRecords()); JSONArray array = new JSONArray(procedure.getRecords());
ArrayList<String> users = new ArrayList<>(); ArrayList<String> users = new ArrayList<>();
for (int i = 0; i < array.length(); i++) { for (int i = 0; i < array.length(); i++) {
JSONObject user = array.getJSONObject(i); Object o = array.get(i);
users.add(user.getString("username")); if(o instanceof JSONObject) {
JSONObject user = (JSONObject) o;
users.add(user.getString("username"));
}else{
users.add((String) o);
}
} }
onRenderUsers(users); onRenderUsers(users);
} catch (JSONException exception) { } catch (JSONException exception) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment