|
@ -389,7 +389,6 @@ class Sessions extends RedisModel {
|
|
|
redis.zcountAsync(messagesByTimestampKey, lastFetchTime, new Date().getTime())
|
|
|
.then(function (count) {
|
|
|
if (!otherUserId) otherUserId = userId;
|
|
|
|
|
|
ParticipantRepo.findNameById(otherUserId, function (err, res) {
|
|
|
if ((res && res.length == 0) || session.type != SESSION_TYPES.P2P) {
|
|
|
sessionName = session.name;
|
|
@ -419,7 +418,8 @@ class Sessions extends RedisModel {
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status
|
|
|
});
|
|
|
|
|
|
index = (parseInt(index) + 1);
|
|
@ -1049,9 +1049,6 @@ class Sessions extends RedisModel {
|
|
|
let self = this;
|
|
|
let sessionKey = RedisModel.makeRedisKey(REDIS_KEYS.Session,sessionId);
|
|
|
redis.hsetAsync(sessionKey,"status",status).then(function(res){
|
|
|
if(!res){
|
|
|
logger.error("set session status to redis is error !");
|
|
|
}
|
|
|
SessionRepo.updateSessionStatus(sessionId,status,function(err,sqlResult){
|
|
|
if(err){
|
|
|
logger.error("set session status to mysql is error !");
|