Browse Source

成员变化的时候时间更新为空问题处理

8 years ago
parent
commit
1372ba24ba
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/server/models/sessions/sessions.js

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

@ -382,7 +382,7 @@ class Sessions extends RedisModel {
                                // 计算未读消息数
                                let messagesByTimestampKey = RedisModel.makeRedisKey(REDIS_KEYS.MessagesByTimestamp, sessionId);
                                redis.zcountAsync(messagesByTimestampKey, lastFetchTime, new Date().getTime())
                                redis.zcountAsync(messagesByTimestampKey, lastFetchTime+1, new Date().getTime())
                                    .then(function (count) {
                                        if (!otherUserId) otherUserId = userId;
                                        ParticipantRepo.findNameById(otherUserId, function (err, res) {
@ -513,7 +513,7 @@ class Sessions extends RedisModel {
                                // 计算未读消息数
                                let messagesByTimestampKey = RedisModel.makeRedisKey(REDIS_KEYS.MessagesByTimestamp, sessionId);
                                redis.zcountAsync(messagesByTimestampKey, lastFetchTime, new Date().getTime())
                                redis.zcountAsync(messagesByTimestampKey, lastFetchTime+1, new Date().getTime())
                                    .then(function (count) {
                                        if (!otherUserId) otherUserId = userId;
                                        ParticipantRepo.findNameById(otherUserId, function (err, res) {