push content modify

pull/103/head
Gordon 3 years ago
parent 2440575093
commit cdf928d64e

@ -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
}

@ -37,17 +37,7 @@ func IsContain(target string, List []string) bool {
return false
}
func IsContainInt64(target int64, List []int64) bool {
for _, element := range List {
if target == element {
return true
}
}
return false
}
func InterfaceArrayToStringArray(data []interface{}) (i []string) {
for _, param := range data {
i = append(i, param.(string))

Loading…
Cancel
Save