mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-01-09 13:36:57 +08:00
fix: refactor setMemberJoinSeq based on review feedback
This commit is contained in:
parent
1ad1e77fe3
commit
48875b8199
@ -970,14 +970,7 @@ func (g *groupServer) deleteMemberAndSetConversationSeq(ctx context.Context, gro
|
|||||||
|
|
||||||
func (g *groupServer) setMemberJoinSeq(ctx context.Context, groupID string, userIDs []string) error {
|
func (g *groupServer) setMemberJoinSeq(ctx context.Context, groupID string, userIDs []string) error {
|
||||||
conversationID := msgprocessor.GetConversationIDBySessionType(constant.ReadGroupChatType, groupID)
|
conversationID := msgprocessor.GetConversationIDBySessionType(constant.ReadGroupChatType, groupID)
|
||||||
maxSeq, err := g.msgClient.GetConversationMaxSeq(ctx, conversationID)
|
return g.conversationClient.SetConversationMaxSeq(ctx, conversationID, userIDs, 0)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := g.conversationClient.SetConversationMinSeq(ctx, conversationID, userIDs, maxSeq+1); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return g.msgClient.SetUserConversationMaxSeq(ctx, conversationID, userIDs, 0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *groupServer) SetGroupInfo(ctx context.Context, req *pbgroup.SetGroupInfoReq) (*pbgroup.SetGroupInfoResp, error) {
|
func (g *groupServer) SetGroupInfo(ctx context.Context, req *pbgroup.SetGroupInfoReq) (*pbgroup.SetGroupInfoResp, error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user