Skip to main content

ensure_profile

Function ensure_profile 

Source
pub async fn ensure_profile(
    app: &App,
    tn_id: TnId,
    id_tag: &str,
) -> ClResult<bool>
Expand description

Ensure a profile exists locally by fetching from remote if needed.

This function:

  1. Checks if the profile already exists locally
  2. If not, fetches the profile from the remote instance
  3. Creates the profile locally with the fetched data

Returns Ok(true) if the profile was synced (created), Ok(false) if it already existed.