Skip to main content

apply_profile_patch

Function apply_profile_patch 

Source
pub fn apply_profile_patch(
    base: &UserProfile,
    patch: &Value,
) -> Result<UserProfile, String>
Expand description

Apply a partial profile JSON patch onto base (load-merge-save semantics).

Used by the People tab “Save + enable invites” path, which intentionally sends only display_name + a subset of sharing flags. Unknown top-level keys are ignored. Nested sharing objects are field-wise merged so omitted flags keep their current values.