mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 11:22:10 +08:00 
			
		
		
		
	fix: sort by id avoid unstable sort friends.
This commit is contained in:
		
							parent
							
								
									ec40d824f6
								
							
						
					
					
						commit
						aff8322bc5
					
				@ -53,7 +53,7 @@ func NewFriendMongo(db *mongo.Database) (database.Friend, error) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (f *FriendMgo) friendSort() any {
 | 
			
		||||
	return bson.D{{"is_pinned", -1}, {"create_time", 1}}
 | 
			
		||||
	return bson.D{{"is_pinned", -1}, {"create_time", 1}, {"_id", 1}}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Create inserts multiple friend records.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user