fix: #9081, load raw settings before merging

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 62463430a9
commit 9da0ed400e

@ -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;

Loading…
Cancel
Save