|
@ -338,7 +338,7 @@ class Sessions extends RedisModel {
|
|
|
redis.hmgetAsync(messagesKey, res).then(function (messages) {
|
|
|
handler(null, messages);
|
|
|
}).then(function () {
|
|
|
Sessions.updateParticipantLastFetchTime(sessionId, userId);
|
|
|
Sessions.updateParticipantLastFetchTime(sessionId, userId,new Date().getTime());
|
|
|
})
|
|
|
}).catch(function (res) {
|
|
|
handler(res, false);
|
|
@ -607,6 +607,7 @@ class Sessions extends RedisModel {
|
|
|
* @param userId
|
|
|
*/
|
|
|
static updateParticipantLastFetchTime(sessionId, userId,score) {
|
|
|
score = score+1;
|
|
|
let participantsKey = RedisModel.makeRedisKey(REDIS_KEYS.SessionParticipants, sessionId);
|
|
|
redis.zaddAsync(participantsKey, score, userId)
|
|
|
.then(function (res) {
|