mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-27 14:02:15 +08:00 
			
		
		
		
	fix: del UserB's conversation version cache when userA set conversation's isPrivateChat to true.
This commit is contained in:
		
							parent
							
								
									b5ef71f5c2
								
							
						
					
					
						commit
						9341143aef
					
				| @ -16,9 +16,10 @@ package controller | ||||
| 
 | ||||
| import ( | ||||
| 	"context" | ||||
| 	"time" | ||||
| 
 | ||||
| 	"github.com/openimsdk/open-im-server/v3/pkg/common/storage/database" | ||||
| 	relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/storage/model" | ||||
| 	"time" | ||||
| 
 | ||||
| 	"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache" | ||||
| 	"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor" | ||||
| @ -194,7 +195,7 @@ func (c *conversationDatabase) SyncPeerUserPrivateConversationTx(ctx context.Con | ||||
| 	return c.tx.Transaction(ctx, func(ctx context.Context) error { | ||||
| 		cache := c.cache.CloneConversationCache() | ||||
| 		for _, conversation := range conversations { | ||||
| 			cache = cache.DelConversationVersionUserIDs(conversation.OwnerUserID) | ||||
| 			cache = cache.DelConversationVersionUserIDs(conversation.OwnerUserID, conversation.UserID) | ||||
| 			for _, v := range [][2]string{{conversation.OwnerUserID, conversation.UserID}, {conversation.UserID, conversation.OwnerUserID}} { | ||||
| 				ownerUserID := v[0] | ||||
| 				userID := v[1] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user