Fix Friends & Social member search; purge all account data on deletion

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DjMbLQujBHunCCu5GpsHaT
This commit is contained in:
Claude committed 2026-09-30 17:46:10 +00:00
1 parent 1a321336b4
commit e344e7144e
10 files changed
+430 -43

No files matched your search

+5 -3
View File
@@ -994,10 +994,12 @@ pub async fn remove_friend(state: State<'_, AppState>, friend_uuid: Option<Strin
#[tauri::command]
pub async fn search_members(state: State<'_, AppState>, query: String) -> Res<Vec<MemberProfile>> {
let req = account_api(&state, reqwest::Method::GET, &format!("/social/members?q={query}")).await?;
let resp = req.send().await.map_err(err)?;
let req = account_api(&state, reqwest::Method::GET, "/social/members").await?;
// `.query` percent-encodes, so names with spaces, `&` or `#` search correctly.
let resp = req.query(&[("q", query.trim())]).send().await.map_err(err)?;
if !resp.status().is_success() {
return Err("unable to search members".into());
let body: serde_json::Value = resp.json().await.unwrap_or_default();
return Err(body["error"].as_str().unwrap_or("unable to search members").to_string());
}
resp.json().await.map_err(err)
}