ソースを参照

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

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