- merge.py: keep private activities in _merged/index.json instead of
stripping them; privacy filtering is now done client-side
- ActivityFeed: detect logged-in user via bincio:me event; show private
activities only when viewing your own profile; private cards get a lock
badge
This commit is contained in:
@@ -152,7 +152,6 @@ def merge_one(data_dir: Path, activity_id: str) -> None:
|
||||
s = _apply_sidecar_summary(s, fm)
|
||||
activities.append(s)
|
||||
|
||||
activities = [a for a in activities if a.get("privacy") != "private"]
|
||||
activities.sort(key=lambda a: a.get("started_at", ""), reverse=True)
|
||||
activities.sort(key=lambda a: 0 if a.get("custom", {}).get("highlight") else 1)
|
||||
|
||||
@@ -262,9 +261,9 @@ def merge_all(data_dir: Path) -> int:
|
||||
activities.append(s)
|
||||
|
||||
# Drop private activities from the published feed
|
||||
activities = [a for a in activities if a.get("privacy") != "private"]
|
||||
|
||||
# Sort: newest first, then bring highlighted activities to the top
|
||||
# Private activities are kept in the index so the owner can see them;
|
||||
# the feed UI filters them out for non-owners client-side.
|
||||
activities.sort(key=lambda a: a.get("started_at", ""), reverse=True)
|
||||
activities.sort(key=lambda a: 0 if a.get("custom", {}).get("highlight") else 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user