Skip to main content

refresh_profile

Function refresh_profile 

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

Refresh an existing profile from remote instance using conditional request.

This function:

  1. Sends a conditional GET request with If-None-Match header using stored etag
  2. If 304 Not Modified: only updates synced_at timestamp
  3. If 200 OK: updates profile data (name, profile_pic) and synced_at
  4. Syncs profile picture if changed

Returns Ok(true) if profile data was updated, Ok(false) if not modified or on error.