|
@ -674,11 +674,11 @@ class Sessions extends RedisModel {
|
|
|
ModelUtil.emitOK(self.eventEmitter, []);
|
|
|
return;
|
|
|
}
|
|
|
var sessionIds=[];
|
|
|
for(var j in res){
|
|
|
sessionIds.push(res[j].id);
|
|
|
}
|
|
|
callback(null,sessionIds);
|
|
|
// var sessionIds=[];
|
|
|
// for(var j in res){
|
|
|
// sessionIds.push(res[j].id);
|
|
|
// }
|
|
|
callback(null,res);
|
|
|
})
|
|
|
},
|
|
|
// 遍历会话
|
|
@ -691,7 +691,8 @@ class Sessions extends RedisModel {
|
|
|
callback = index, index = 0
|
|
|
}
|
|
|
|
|
|
let sessionId = sessionIds[index];
|
|
|
let mysqlSession = sessionIds[index];
|
|
|
let sessionId = mysqlSession.id;
|
|
|
let sessionKey = RedisModel.makeRedisKey(REDIS_KEYS.Session, sessionId);
|
|
|
let participantsRoleKey = RedisModel.makeRedisKey(REDIS_KEYS.SessionParticipantsRole, sessionId);
|
|
|
let sessionParticipantsKey = RedisModel.makeRedisKey(REDIS_KEYS.SessionParticipants, sessionId);
|
|
@ -760,7 +761,7 @@ class Sessions extends RedisModel {
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: session.create_date,
|
|
|
create_date: new Date(mysqlSession.last_message_time).getTime(),
|
|
|
last_content_type: session.last_content_type,
|
|
|
last_content: session.last_content,
|
|
|
sender_id: session.last_sender_id,
|