mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	fix: #9081, load raw settings before merging
This commit is contained in:
		@@ -109,7 +109,8 @@ usersAPI.updateSettings = async function (caller, data) {
 | 
			
		||||
		throw new Error('[[error:no-privileges]]');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	const current = await user.getSettings(data.uid);
 | 
			
		||||
	// load raw settings without parsing values to booleans
 | 
			
		||||
	const current = await db.getObject('user:' + data.uid + ':settings');
 | 
			
		||||
	const payload = { ...current, ...data.settings };
 | 
			
		||||
	delete payload.uid;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user