mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-04 11:22:17 +08:00
fix: the original message referenced by the pull message processing is withdrawn
This commit is contained in:
parent
6546031db0
commit
a28adc5ab6
@ -453,20 +453,22 @@ func (db *commonMsgDatabase) handlerDBMsg(ctx context.Context, cache map[int64][
|
|||||||
log.ZError(ctx, "json.Unmarshal", err)
|
log.ZError(ctx, "json.Unmarshal", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if quoteMsg.QuoteMessage == nil || quoteMsg.QuoteMessage.ContentType == constant.MsgRevokeNotification {
|
//if quoteMsg.QuoteMessage == nil || quoteMsg.QuoteMessage.ContentType == constant.MsgRevokeNotification {
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
var msgs []*unrelationtb.MsgInfoModel
|
var msgs []*unrelationtb.MsgInfoModel
|
||||||
if v, ok := cache[quoteMsg.QuoteMessage.Seq]; ok {
|
if v, ok := cache[quoteMsg.QuoteMessage.Seq]; ok {
|
||||||
msgs = v
|
msgs = v
|
||||||
} else {
|
} else {
|
||||||
ms, err := db.msgDocDatabase.GetMsgBySeqIndexIn1Doc(ctx, userID, db.msg.GetDocID(conversationID, quoteMsg.QuoteMessage.Seq), []int64{quoteMsg.QuoteMessage.Seq})
|
if quoteMsg.QuoteMessage.Seq > 0 {
|
||||||
if err != nil {
|
ms, err := db.msgDocDatabase.GetMsgBySeqIndexIn1Doc(ctx, userID, db.msg.GetDocID(conversationID, quoteMsg.QuoteMessage.Seq), []int64{quoteMsg.QuoteMessage.Seq})
|
||||||
log.ZError(ctx, "GetMsgBySeqIndexIn1Doc", err, "conversationID", conversationID, "seq", quoteMsg.QuoteMessage.Seq)
|
if err != nil {
|
||||||
return
|
log.ZError(ctx, "GetMsgBySeqIndexIn1Doc", err, "conversationID", conversationID, "seq", quoteMsg.QuoteMessage.Seq)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
msgs = ms
|
||||||
|
cache[quoteMsg.QuoteMessage.Seq] = ms
|
||||||
}
|
}
|
||||||
msgs = ms
|
|
||||||
cache[quoteMsg.QuoteMessage.Seq] = ms
|
|
||||||
}
|
}
|
||||||
if len(msgs) != 0 && msgs[0].Msg.ContentType != constant.MsgRevokeNotification {
|
if len(msgs) != 0 && msgs[0].Msg.ContentType != constant.MsgRevokeNotification {
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user