mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
feat: avoid pulling messages from sessions with a large number of max seq values of 0 (#2602)
* fix: GroupApplicationAcceptedNotification * fix: GroupApplicationAcceptedNotification * fix: NotificationUserInfoUpdate * cicd: robot automated Change * fix: component * fix: getConversationInfo * feat: cron task * feat: cron task * feat: cron task * feat: cron task * feat: cron task * fix: minio config url recognition error * update gomake version * update gomake version * fix: seq conversion bug * fix: redis pipe exec * fix: ImportFriends * fix: A large number of logs keysAndValues length is not even * feat: mark read aggregate write * feat: online status supports redis cluster * feat: online status supports redis cluster * feat: online status supports redis cluster * merge * merge * read seq is written to mongo * read seq is written to mongo * fix: invitation to join group notification * fix: friend op_user_id * feat: optimizing asynchronous context * feat: optimizing memamq size * feat: add GetSeqMessage * feat: GroupApplicationAgreeMemberEnterNotification * feat: GroupApplicationAgreeMemberEnterNotification * feat: go.mod * feat: go.mod * feat: join group notification and get seq * feat: join group notification and get seq * feat: avoid pulling messages from sessions with a large number of max seq values of 0 --------- Co-authored-by: withchao <withchao@users.noreply.github.com>
This commit is contained in:
parent
6dd4e56c2a
commit
eea2627a28
@ -132,6 +132,12 @@ func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sd
|
|||||||
log.ZWarn(ctx, "GetMaxSeqs error", err, "conversationIDs", conversationIDs, "maxSeqs", maxSeqs)
|
log.ZWarn(ctx, "GetMaxSeqs error", err, "conversationIDs", conversationIDs, "maxSeqs", maxSeqs)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
// avoid pulling messages from sessions with a large number of max seq values of 0
|
||||||
|
for conversationID, seq := range maxSeqs {
|
||||||
|
if seq == 0 {
|
||||||
|
delete(maxSeqs, conversationID)
|
||||||
|
}
|
||||||
|
}
|
||||||
resp := new(sdkws.GetMaxSeqResp)
|
resp := new(sdkws.GetMaxSeqResp)
|
||||||
resp.MaxSeqs = maxSeqs
|
resp.MaxSeqs = maxSeqs
|
||||||
return resp, nil
|
return resp, nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user