mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-19 12:47:06 +08:00
fix bug: heartbeat get self notification
This commit is contained in:
parent
95fd4ba2c3
commit
b299da6129
@ -95,6 +95,7 @@ func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sd
|
||||
for _, conversationID := range conversationIDs {
|
||||
conversationIDs = append(conversationIDs, utils.GetNotificationConversationIDByConversationID(conversationID))
|
||||
}
|
||||
conversationIDs = append(conversationIDs, utils.GetSelfNotificationConversationID(req.UserID))
|
||||
log.ZDebug(ctx, "GetMaxSeq", "conversationIDs", conversationIDs)
|
||||
maxSeqs, err := m.MsgDatabase.GetMaxSeqs(ctx, conversationIDs)
|
||||
if err != nil {
|
||||
|
||||
@ -367,6 +367,10 @@ func GetNotificationConversationIDByConversationID(conversationID string) string
|
||||
return ""
|
||||
}
|
||||
|
||||
func GetSelfNotificationConversationID(userID string) string {
|
||||
return "n_" + userID + "_" + userID
|
||||
}
|
||||
|
||||
func GetSeqsBeginEnd(seqs []int64) (int64, int64) {
|
||||
if len(seqs) == 0 {
|
||||
return 0, 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user