Commit 0e331c30 authored by Tiago Cunha's avatar Tiago Cunha Committed by GitHub

Merge pull request #278 from ano95/bug/member-list

Fix JSON in member list
parents d642f076 0d412ef5
......@@ -164,7 +164,13 @@ public class UsersOfRoomDialogFragment extends AbstractChatRoomDialogFragment {
JSONArray array = new JSONArray(procedure.getRecords());
ArrayList<String> users = new ArrayList<>();
for (int i = 0; i < array.length(); i++) {
users.add(array.getString(i));
Object userObject = array.get(i);
if (userObject instanceof JSONObject) {
JSONObject user = (JSONObject) userObject;
users.add(user.getString("username"));
} else {
users.add((String) userObject);
}
}
onRenderUsers(users);
} 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