//result/mem_list
JSONArray memlist = result.getJSONArray("mem_info");
for(int i=0; i<memlist.length(); i++){
JSONObject memjson = memlist.getJSONObject(i);
QQDiscuzMember member = discuz.getMemberByUin(memjson.getLong("uin"));
if(member == null) {
member = new QQDiscuzMember();
discuz.addMemeber(member);
}
member.setUin(memjson.getLong("uin"));
member.setQQ(memjson.getLong("uin")); //这里有用户真实的QQ号
member.setNickname(memjson.getString("nick"));
member.setDiscuz(discuz);
}
// 消除所有成员状态,如果不在线的,webqq是不会返回的。
discuz.clearStatus();
//result/mem_status
JSONArray statlist = result.getJSONArray("mem_status");
for(int i=0; i<statlist.length(); i++){
// 下面重新设置最新状态
JSONObject statjson = statlist.getJSONObject(i);
QQUser member = discuz.getMemberByUin(statjson.getLong("uin"));
if(statjson.has("client_type") && member != null) {
member.setClientType(QQClientType.valueOfRaw(statjson.getInt("client_type")));
member.setStatus(QQStatus.valueOfRaw(statjson.getString("status")));
}
}
//result/mem_info
JSONArray infolist = result.getJSONArray("mem_info");
for(int i=0; i<infolist.length(); i++){
JSONObject infojson = infolist.getJSONObject(i);
QQUser member = discuz.getMemberByUin(infojson.getLong("uin"));
member.setNickname(infojson.getString("nick"));
}
notifyActionEvent(QQActionEvent.Type.EVT_OK, store.getDiscuzList());
}else{
notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(QQErrorCode.UNEXPECTED_RESPONSE));