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