fed-sx-m1: Step 4b-cod — 8 bootstrap codecs/sig-suites/audience files + manifest complete + 14 new parse tests (50 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 26s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 26s
This commit is contained in:
14
next/genesis/audience/direct.sx
Normal file
14
next/genesis/audience/direct.sx
Normal file
@@ -0,0 +1,14 @@
|
||||
;; next/genesis/audience/direct.sx
|
||||
;;
|
||||
;; Direct audience: an actor is a member iff they are
|
||||
;; explicitly named in the activity's :to or :cc lists. No
|
||||
;; group expansion — true direct addressing only.
|
||||
|
||||
(DefineAudience
|
||||
:name "Direct"
|
||||
:doc "Direct-addressing predicate. Tests literal membership\n in the activity's :to or :cc."
|
||||
:member-of (fn
|
||||
(actor audience)
|
||||
(or
|
||||
(member? actor (-> audience :to))
|
||||
(member? actor (-> audience :cc)))))
|
||||
14
next/genesis/audience/followers.sx
Normal file
14
next/genesis/audience/followers.sx
Normal file
@@ -0,0 +1,14 @@
|
||||
;; next/genesis/audience/followers.sx
|
||||
;;
|
||||
;; Followers audience: an actor is a member iff they appear in
|
||||
;; the audience-owner's :followers set in the audience-graph
|
||||
;; projection. Federation (m2) wires this to peer delivery.
|
||||
|
||||
(DefineAudience
|
||||
:name "Followers"
|
||||
:doc "Followers-of-owner predicate. Looks up the\n audience-graph projection's :followers list for the\n audience owner and tests membership."
|
||||
:member-of (fn
|
||||
(actor audience)
|
||||
(member?
|
||||
actor
|
||||
(-> (get-projection :audience-graph) (-> audience :owner) :followers))))
|
||||
9
next/genesis/audience/public.sx
Normal file
9
next/genesis/audience/public.sx
Normal file
@@ -0,0 +1,9 @@
|
||||
;; next/genesis/audience/public.sx
|
||||
;;
|
||||
;; Public audience: every actor is a member. Maps to the AP
|
||||
;; magic id `https://www.w3.org/ns/activitystreams#Public`.
|
||||
|
||||
(DefineAudience
|
||||
:name "Public"
|
||||
:doc "Public audience predicate. Always returns true — every\n actor on the network is considered a member."
|
||||
:member-of (fn (actor audience) true))
|
||||
Reference in New Issue
Block a user