|
|
|
@ -5,7 +5,6 @@ import (
|
|
|
|
|
"Open_IM/src/common/constant"
|
|
|
|
|
"Open_IM/src/common/log"
|
|
|
|
|
pbMsg "Open_IM/src/proto/chat"
|
|
|
|
|
"Open_IM/src/utils"
|
|
|
|
|
"errors"
|
|
|
|
|
"github.com/golang/protobuf/proto"
|
|
|
|
|
"gopkg.in/mgo.v2/bson"
|
|
|
|
@ -125,7 +124,7 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*p
|
|
|
|
|
log.NewError("", "not find seqUid", seqUid, value, uid, seqList)
|
|
|
|
|
return nil, nil, MaxSeq, MinSeq, err
|
|
|
|
|
}
|
|
|
|
|
if utils.IsContainInt64(pChat.RecvSeq, value) {
|
|
|
|
|
if isContainInt64(pChat.RecvSeq, value) {
|
|
|
|
|
temp.SendID = pChat.SendID
|
|
|
|
|
temp.RecvID = pChat.RecvID
|
|
|
|
|
temp.MsgFrom = pChat.MsgFrom
|
|
|
|
@ -319,3 +318,14 @@ func getSeqUid(uid string, seq int64) string {
|
|
|
|
|
seqSuffix := seq / singleGocMsgNum
|
|
|
|
|
return uid + ":" + strconv.FormatInt(seqSuffix, 10)
|
|
|
|
|
}
|
|
|
|
|
func isContainInt64(target int64, List []int64) bool {
|
|
|
|
|
|
|
|
|
|
for _, element := range List {
|
|
|
|
|
|
|
|
|
|
if target == element {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|