@ -104,7 +104,7 @@ func (c *conversationDatabase) SetUsersConversationFiledTx(ctx context.Context,
if err != nil {
return err
}
cache = cache . DelConversationIDs ( NotUserIDs ... ) . DelUserConversationIDsHash ( NotUserIDs ... ) . DelConv s ersations( conversation . ConversationID , NotUserIDs ... )
cache = cache . DelConversationIDs ( NotUserIDs ... ) . DelUserConversationIDsHash ( NotUserIDs ... ) . DelConv ersations( conversation . ConversationID , NotUserIDs ... )
}
return nil
} ) ; err != nil {
@ -128,7 +128,7 @@ func (c *conversationDatabase) CreateConversation(ctx context.Context, conversat
var userIDs [ ] string
cache := c . cache . NewCache ( )
for _ , conversation := range conversations {
cache = cache . DelConv s ersations( conversation . OwnerUserID , conversation . ConversationID )
cache = cache . DelConv ersations( conversation . OwnerUserID , conversation . ConversationID )
userIDs = append ( userIDs , conversation . OwnerUserID )
}
return cache . DelConversationIDs ( userIDs ... ) . DelUserConversationIDsHash ( userIDs ... ) . ExecDel ( ctx )
@ -190,7 +190,7 @@ func (c *conversationDatabase) SetUserConversations(ctx context.Context, ownerUs
var conversationIDs [ ] string
for _ , conversation := range conversations {
conversationIDs = append ( conversationIDs , conversation . ConversationID )
cache = cache . DelConv s ersations( conversation . OwnerUserID , conversation . ConversationID )
cache = cache . DelConv ersations( conversation . OwnerUserID , conversation . ConversationID )
}
conversationTx := c . conversationDB . NewTx ( tx )
existConversations , err := conversationTx . Find ( ctx , ownerUserID , conversationIDs )
@ -247,7 +247,7 @@ func (c *conversationDatabase) CreateGroupChatConversation(ctx context.Context,
for _ , v := range notExistUserIDs {
conversation := relationTb . ConversationModel { ConversationType : constant . SuperGroupChatType , GroupID : groupID , OwnerUserID : v , ConversationID : conversationID }
conversations = append ( conversations , & conversation )
cache = cache . DelConv s ersations( v , conversationID )
cache = cache . DelConv ersations( v , conversationID )
}
cache = cache . DelConversationIDs ( notExistUserIDs ... ) . DelUserConversationIDsHash ( notExistUserIDs ... )
if len ( conversations ) > 0 {
@ -261,7 +261,7 @@ func (c *conversationDatabase) CreateGroupChatConversation(ctx context.Context,
return err
}
for _ , v := range existConversationUserIDs {
cache = cache . DelConv s ersations( v , conversationID )
cache = cache . DelConv ersations( v , conversationID )
}
return nil
} ) ; err != nil {