fix: when unable EnableHistoryForNewMembers, new group member can read last one message. (#3001)

This commit is contained in:
icey-yu 2024-12-25 18:07:12 +08:00 committed by OpenIM-Robot
parent 9ac35c9059
commit 3e872d6c5a

View File

@ -18,9 +18,10 @@ import (
"context"
"errors"
"fmt"
"github.com/openimsdk/open-im-server/v3/pkg/rpcli"
"time"
"github.com/openimsdk/open-im-server/v3/pkg/rpcli"
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
"github.com/openimsdk/open-im-server/v3/pkg/common/servererrs"
@ -533,7 +534,7 @@ func (g *NotificationSender) GroupApplicationAgreeMemberEnterNotification(ctx co
if err != nil {
return err
}
if err := g.msgClient.SetUserConversationsMinSeq(ctx, conversationID, entrantUserID, maxSeq); err != nil {
if err := g.msgClient.SetUserConversationsMinSeq(ctx, conversationID, entrantUserID, maxSeq+1); err != nil {
return err
}
}
@ -587,7 +588,7 @@ func (g *NotificationSender) MemberEnterNotification(ctx context.Context, groupI
if err != nil {
return err
}
if err := g.msgClient.SetUserConversationsMinSeq(ctx, conversationID, []string{entrantUserID}, maxSeq); err != nil {
if err := g.msgClient.SetUserConversationsMinSeq(ctx, conversationID, []string{entrantUserID}, maxSeq+1); err != nil {
return err
}
}