Pārlūkot izejas kodu

错误代码修正

8 gadi atpakaļ
vecāks
revīzija
c50f2533ef
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  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) {
                                redis.hmgetAsync(messagesKey, res).then(function (messages) {
                                    handler(null, messages);
                                    handler(null, messages);
                                }).then(function () {
                                }).then(function () {
                                    Sessions.updateParticipantLastFetchTime(sessionId, userId);
                                    Sessions.updateParticipantLastFetchTime(sessionId, userId,new Date().getTime());
                                })
                                })
                            }).catch(function (res) {
                            }).catch(function (res) {
                            handler(res, false);
                            handler(res, false);
@ -607,6 +607,7 @@ class Sessions extends RedisModel {
     * @param userId
     * @param userId
     */
     */
    static updateParticipantLastFetchTime(sessionId, userId,score) {
    static updateParticipantLastFetchTime(sessionId, userId,score) {
        score = score+1;
        let participantsKey = RedisModel.makeRedisKey(REDIS_KEYS.SessionParticipants, sessionId);
        let participantsKey = RedisModel.makeRedisKey(REDIS_KEYS.SessionParticipants, sessionId);
        redis.zaddAsync(participantsKey, score, userId)
        redis.zaddAsync(participantsKey, score, userId)
            .then(function (res) {
            .then(function (res) {