The reset button for server/global settings currently do not work. This is because the sent settings always merge with the existing settings, and thus removed properties do not reset, as the existing settings are retained.
This PR modifies this behaviour to prevent automatic merging unless required. Merging always does still happen with default settings. This fixes #472.
Additionally, when global settings are updated, the server attempts to update the sender's settings with an empty object - instead, this behaviour has been replaced with a conditional update to the sender's settings, aka If a actually sender updates their settings, only then will the backend attempt to modify it.
Tests for unexpected behavior
Global reset settings works
Local settings change works
Changing global settings does not reset local settings
Settings actually work
Settings are persisted both on backend and frontend
Summary of PR
The reset button for server/global settings currently do not work. This is because the sent settings always merge with the existing settings, and thus removed properties do not reset, as the existing settings are retained.
This PR modifies this behaviour to prevent automatic merging unless required. Merging always does still happen with default settings. This fixes #472.
Additionally, when global settings are updated, the server attempts to update the sender's settings with an empty object - instead, this behaviour has been replaced with a conditional update to the sender's settings, aka If a actually sender updates their settings, only then will the backend attempt to modify it.
Tests for unexpected behavior
Time spent on PR
2 hours
Linked issues
Fix #472 Fix #449