mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-11-25 03:05:06 +08:00
Merge 53cb119dcf92c73678946144ad98b9150201ecf1 into a101d85ec16cc21bec60005169725adc1ae5649a
This commit is contained in:
commit
8e875c2957
@ -66,9 +66,6 @@ func (g *groupServer) GetFullJoinGroupIDs(ctx context.Context, req *pbgroup.GetF
|
||||
}
|
||||
|
||||
func (g *groupServer) GetIncrementalGroupMember(ctx context.Context, req *pbgroup.GetIncrementalGroupMemberReq) (*pbgroup.GetIncrementalGroupMemberResp, error) {
|
||||
if err := g.checkAdminOrInGroup(ctx, req.GroupID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
group, err := g.db.TakeGroup(ctx, req.GroupID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -76,6 +73,9 @@ func (g *groupServer) GetIncrementalGroupMember(ctx context.Context, req *pbgrou
|
||||
if group.Status == constant.GroupStatusDismissed {
|
||||
return nil, servererrs.ErrDismissedAlready.Wrap()
|
||||
}
|
||||
if err := g.checkAdminOrInGroup(ctx, req.GroupID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var (
|
||||
hasGroupUpdate bool
|
||||
sortVersion uint64
|
||||
|
||||
@ -142,7 +142,10 @@ func (c *conversationDatabase) SetUsersConversationFieldTx(ctx context.Context,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cache = cache.DelConversationIDs(NotUserIDs...).DelUserConversationIDsHash(NotUserIDs...).DelConversations(conversation.ConversationID, NotUserIDs...)
|
||||
cache = cache.DelConversationIDs(NotUserIDs...).
|
||||
DelUserConversationIDsHash(NotUserIDs...).
|
||||
DelUsersConversation(conversation.ConversationID, NotUserIDs...).
|
||||
DelConversationVersionUserIDs(NotUserIDs...)
|
||||
}
|
||||
return cache.ChainExecDel(ctx)
|
||||
})
|
||||
@ -335,7 +338,9 @@ func (c *conversationDatabase) CreateGroupChatConversation(ctx context.Context,
|
||||
conversations = append(conversations, &conversation)
|
||||
cache = cache.DelConversations(v, conversationID).DelConversationNotReceiveMessageUserIDs(conversationID)
|
||||
}
|
||||
cache = cache.DelConversationIDs(notExistUserIDs...).DelUserConversationIDsHash(notExistUserIDs...)
|
||||
cache = cache.DelConversationIDs(notExistUserIDs...).
|
||||
DelUserConversationIDsHash(notExistUserIDs...).
|
||||
DelConversationVersionUserIDs(userIDs...)
|
||||
if len(conversations) > 0 {
|
||||
err = c.conversationDB.Create(ctx, conversations)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user