fix: EditDrawer correctly reads and labels unlisted privacy

- serve/server.py GET adds private:bool to the response (true when
  privacy is "unlisted" or legacy "private") so EditDrawer can read it
- edit/server.py GET: same fix for the single-user edit server
- EditDrawer: fall back to d.privacy if d.private is absent; rename
  "Private" toggle label to "Unlisted"
This commit is contained in:
Davide Scaini
2026-04-19 22:58:09 +02:00
parent 8a3e7831d3
commit 5227b30456
3 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -407,7 +407,7 @@ async def get_activity(activity_id: str) -> JSONResponse:
"gear": fm.get("gear", detail.get("gear") or ""),
"description": body or fm.get("description") or detail.get("description") or "",
"highlight": fm.get("highlight", detail.get("custom", {}).get("highlight", False)),
"private": fm.get("private", detail.get("privacy") == "private"),
"private": fm.get("private", detail.get("privacy") in ("private", "unlisted")),
"hide_stats": fm.get("hide_stats", detail.get("custom", {}).get("hide_stats", [])),
"images": images,
})