itsgoin/crates/core
Scott Reimers 673f9e2261 feat(fof-layer2): wire FoF gating into post-create path
Threads optional fof_gating through create_post_inner so a published
post can carry the author-signed gating snapshot at publish time
(covered by PostId = BLAKE3(Post)).

New public entry point:

  Node::create_post_with_fof_comments(content, attachments)
      -> (PostId, Post, PostVisibility, cek: [u8; 32])

Builds the FoFCommentGating block via fof::build_fof_comment_gating
from the default persona's keyring (own V_me + every received V_x),
then calls create_post_inner with VisibilityIntent::Public (Mode 2
keeps body public). Returns the per-post CEK to the caller for local
caching (decrypting one's own comments later).

Existing create_post / create_post_as / create_post_with_visibility
threads `None` through the new arg — back-compat for non-FoF posts.

CommentPolicy::FriendsOfFriends is NOT published as a SetPolicy diff
in this commit; the post's `fof_gating` field is itself the signal
that the post supports FoF commenting. The four-check CDN verify gate
(next commit) reads fof_gating directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 14:01:57 -04:00
..
src feat(fof-layer2): wire FoF gating into post-create path 2026-05-14 14:01:57 -04:00
Cargo.toml v0.6.2 release: version bump + changelog 2026-04-22 23:54:40 -04:00