пре 8 година
родитељ
комит
c50f2533ef
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/server/models/sessions/sessions.js

+ 2 - 1
src/server/models/sessions/sessions.js

@ -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) {