Procházet zdrojové kódy

错误代码修正

před 8 roky
rodič
revize
c50f2533ef
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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) {