mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-14 22:59:24 +08:00
fix Pb2String
This commit is contained in:
parent
decd6a98be
commit
4f322254b0
@ -145,14 +145,9 @@ func (rpc *rpcChat) runCh() {
|
||||
select {
|
||||
case msg := <-rpc.delMsgCh:
|
||||
log.NewInfo(msg.OperationID, utils.GetSelfFuncName(), "delmsgch recv new: ", msg)
|
||||
db.DB.DelMsgFromCache(msg.UserID, msg.SeqList, msg.OperationID)
|
||||
unexistSeqList, err := db.DB.DelMsgBySeqList(msg.UserID, msg.SeqList, msg.OperationID)
|
||||
if err != nil {
|
||||
log.NewError(msg.OperationID, utils.GetSelfFuncName(), "DelMsgBySeqList args: ", msg.UserID, msg.SeqList, msg.OperationID, err.Error())
|
||||
continue
|
||||
}
|
||||
if len(unexistSeqList) > 0 {
|
||||
DeleteMessageNotification(msg.OpUserID, msg.UserID, unexistSeqList, msg.OperationID)
|
||||
if len(msg.SeqList) > 0 {
|
||||
db.DB.DelMsgFromCache(msg.UserID, msg.SeqList, msg.OperationID)
|
||||
DeleteMessageNotification(msg.OpUserID, msg.UserID, msg.SeqList, msg.OperationID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ func (d *DataBases) GetMinSeqFromMongo2(uid string) (MinSeq uint32, err error) {
|
||||
}
|
||||
|
||||
// deleteMsgByLogic
|
||||
func (d *DataBases) DelMsgBySeqList(userID string, seqList []uint32, operationID string) (totalUnexistSeqList []uint32, err error) {
|
||||
func (d *DataBases) DelMsgBySeqList(userID string, seqList []uint32, operationID string) (totalUnExistSeqList []uint32, err error) {
|
||||
log.Debug(operationID, utils.GetSelfFuncName(), "args ", userID, seqList)
|
||||
sortkeys.Uint32s(seqList)
|
||||
suffixUserID2SubSeqList := func(uid string, seqList []uint32) map[string][]uint32 {
|
||||
@ -123,11 +123,11 @@ func (d *DataBases) DelMsgBySeqList(userID string, seqList []uint32, operationID
|
||||
return
|
||||
}
|
||||
lock.Lock()
|
||||
totalUnexistSeqList = append(totalUnexistSeqList, unexistSeqList...)
|
||||
totalUnExistSeqList = append(totalUnExistSeqList, unexistSeqList...)
|
||||
lock.Unlock()
|
||||
}(k, v, operationID)
|
||||
}
|
||||
return totalUnexistSeqList, err
|
||||
return totalUnExistSeqList, err
|
||||
}
|
||||
|
||||
func (d *DataBases) DelMsgBySeqListInOneDoc(suffixUserID string, seqList []uint32, operationID string) ([]uint32, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user