|
@ -31,7 +31,6 @@ class Participants extends RedisModel {
|
|
ModelUtil.emitError(self.eventEmitter, "Get session participants error", err);
|
|
ModelUtil.emitError(self.eventEmitter, "Get session participants error", err);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
ModelUtil.emitOK(self.eventEmitter, participants);
|
|
ModelUtil.emitOK(self.eventEmitter, participants);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@ -101,12 +100,10 @@ class Participants extends RedisModel {
|
|
|
|
|
|
participantsArray.forEach(function (item) {
|
|
participantsArray.forEach(function (item) {
|
|
let tokens = item.split(":");
|
|
let tokens = item.split(":");
|
|
if(tokens[1]!=2){
|
|
|
|
userSessions[RedisModel.makeRedisKey(REDIS_KEYS.UserSessions, tokens[0])] = [createDate.getTime(), sessionId];
|
|
|
|
sessionParticipants.push(createDate.getTime());
|
|
|
|
sessionParticipants.push(tokens[0]);
|
|
|
|
sessionParticipantsRoles.push(tokens[0], tokens[1]);
|
|
|
|
}
|
|
|
|
|
|
userSessions[RedisModel.makeRedisKey(REDIS_KEYS.UserSessions, tokens[0])] = [createDate.getTime(), sessionId];
|
|
|
|
sessionParticipants.push(createDate.getTime());
|
|
|
|
sessionParticipants.push(tokens[0]);
|
|
|
|
sessionParticipantsRoles.push(tokens[0], tokens[1]);
|
|
});
|
|
});
|
|
// 向会话成员、会话成员角色集合中添加数据
|
|
// 向会话成员、会话成员角色集合中添加数据
|
|
let sessionParticipantsKey = RedisModel.makeRedisKey(REDIS_KEYS.SessionParticipants, sessionId);
|
|
let sessionParticipantsKey = RedisModel.makeRedisKey(REDIS_KEYS.SessionParticipants, sessionId);
|