Forum: asking about one's own chart, forecast or comparison

- "Kérdezek róla a fórumon" on the chart, yearly forecast and comparison
  pages: after a window that says what goes out, a share link made for the
  forum (never birth data, names or a title) and a new thread in "Égbolt és
  képletek" with it attached.
- The question shows a card (Sun, Moon, Ascendant with sign, degree and
  house, the summary's title, a link to the shared page) to logged-in
  members only; visitors and search engines see only that there is one.
  The author can take it off, and deleting the question ends the link.
- The shared page (/s/...) now shows comparisons (one wheel, the aspects,
  no names) and yearly forecasts (keys, timeline, transits, the detailed
  text; without the birthday's place); the backend shares forecasts.
- The privacy notice (HU, EN) covers attached charts and muted members.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-26 14:52:00 +00:00
co-authored by Claude Opus 5.5
parent 9ca3f478be
commit 863002c1e7
24 changed files with 871 additions and 32 deletions
+28
View File
@@ -1011,6 +1011,21 @@ async fn public_shares(pool: PgPool) {
);
assert_eq!(app.get(&format!("/v1/public/shares/{slug}"), None).await.status, StatusCode::NOT_FOUND);
assert_eq!(app.get("/v1/public/shares/nincs-ilyen", None).await.status, StatusCode::NOT_FOUND);
// A share for the forum: its own link, never birth data, no names, no title.
let r = app
.post(
"/v1/shares",
Some(&anna),
json!({"kind": "chart", "target_id": chart_id, "for_forum": true, "show_birth_data": true, "title": "Én"}),
)
.await;
assert_eq!(r.status, StatusCode::CREATED, "{}", r.body);
assert_eq!((r.body["for_forum"].as_bool(), r.body["show_birth_data"].as_bool()), (Some(true), Some(false)));
let r = app.get(&format!("/v1/public/shares/{}", r.body["slug"].as_str().unwrap()), None).await;
assert!(r.body["chart"]["label"].is_null(), "{}", r.body);
assert!(r.body["chart"]["chart"].get("birth").is_none());
assert!(r.body["title"].is_null());
}
#[sqlx::test(migrator = "db::MIGRATOR")]
@@ -1968,6 +1983,19 @@ async fn forecasts_are_free_their_analysis_uses_a_forecast_unit(pool: PgPool) {
assert_eq!(app.get(&uri, Some(&bob)).await.status, StatusCode::NOT_FOUND);
assert_eq!(app.get(&format!("/v1/forecasts/{id}"), Some(&anna)).await.body["year"], json!(year));
// A forecast can be shared (not by others), without where it was reckoned.
let r = app.post("/v1/shares", Some(&bob), json!({"kind": "forecast", "target_id": away.body["id"]})).await;
assert_eq!(r.status, StatusCode::NOT_FOUND);
let r = app
.post("/v1/shares", Some(&anna), json!({"kind": "forecast", "target_id": away.body["id"], "for_forum": true}))
.await;
assert_eq!(r.status, StatusCode::CREATED, "{}", r.body);
let shared = app.get(&format!("/v1/public/shares/{}", r.body["slug"].as_str().unwrap()), None).await.body;
assert_eq!(shared["kind"], "forecast");
assert_eq!(shared["forecast"]["forecast"]["start"], format!("{year}-03-15"));
assert!(!shared.to_string().contains("Tokió"), "the place stays private: {shared}");
assert!(shared["analysis"].is_null(), "no detailed text yet");
// the detailed text uses a forecast unit, not a natal one
let analyses = format!("/v1/forecasts/{id}/analyses");
grant_units(&app, &anna, "natal", 1).await;