Skip to content

Commit

Permalink
Fix getHistory bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
wubenqi committed Feb 24, 2019
1 parent 8bffb8c commit 6cf27ea
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package messages

import (
"github.com/golang/glog"
"github.com/nebula-chat/chatengine/pkg/grpc_util"
"github.com/nebula-chat/chatengine/pkg/logger"
"github.com/nebula-chat/chatengine/mtproto"
"github.com/nebula-chat/chatengine/messenger/biz_server/biz/base"
"github.com/nebula-chat/chatengine/messenger/biz_server/biz/core/message"
"github.com/nebula-chat/chatengine/mtproto"
"github.com/nebula-chat/chatengine/pkg/grpc_util"
"github.com/nebula-chat/chatengine/pkg/logger"
"golang.org/x/net/context"
"math"
)
Expand Down Expand Up @@ -338,6 +338,9 @@ func (s *MessagesServiceImpl) getHistoryMessages(md *grpc_util.RpcMetadata, requ
}

offsetId := request.GetOffsetId()
if offsetId == 0 {
offsetId = math.MaxInt32
}
addOffset := request.GetAddOffset()
limit := request.GetLimit()

Expand Down

0 comments on commit 6cf27ea

Please sign in to comment.