소스 검색

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

8 년 전
부모
커밋
1372ba24ba
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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) {