@@ -59,10 +59,11 @@
60 ++ get-state-2
60 ++ get-state-2
61 |= =directory:s
61 |= =directory:s
62+ =/ purged (purge-invalid directory)
63 (reindex directory)
64 (reindex directory)
65− (purge directory)
66+ (purge-foreign purged)
67 ++ reindex
68 ++ reindex
68 |= =directory:s
69 |= =directory:s
@@ -70,7 +71,15 @@
70 ~(tap by directory)
71 ~(tap by directory)
71 |= [[=hash:s l=listing:s] i=index:s]
72 |= [[=hash:s l=listing:s] i=index:s]
72 (~(catalog delver i) hash l)
73 (~(catalog delver i) hash l)
73− ++ purge
74+ ++ purge-invalid
80+ |= [=hash:s =listing:s]
81+ (listing-valid listing)
74 |= =directory:s
83 |= =directory:s
75 ^- directory:s
84 ^- directory:s
@@ -151,6 +160,7 @@
151 ?: (~(has by directory) hash.listing)
160 ?: (~(has by directory) hash.listing)
152 ~& 'Listing already exists.'
161 ~& 'Listing already exists.'
163+ ?. (listing-valid listing) cor
154 di-abet:(di-publish:(di-abed:di-core:core hash.listing) listing)
164 di-abet:(di-publish:(di-abed:di-core:core hash.listing) listing)
@@ -177,8 +187,9 @@
177 =+ !<(=listing:s vase)
187 =+ !<(=listing:s vase)
178 ?> =(hash.listing (digest post.listing))
188 ?> =(hash.listing (digest post.listing))
179 ?: (~(has by directory) hash.listing)
189 ?: (~(has by directory) hash.listing)
180− ~& 'Listing already exists.'
190+ ~& 'Listing already exists.'
192+ ?. (listing-valid listing) cor
182 di-abet:(di-receive:(di-abed:di-core hash.listing) listing)
193 di-abet:(di-receive:(di-abed:di-core hash.listing) listing)
184 %directory
195 %directory
@@ -315,7 +326,7 @@
315 =. index (~(catalog delver index) hash l)
326 =. index (~(catalog delver index) hash l)
316 =. published
327 =. published
317 ?. =(source.listing our:bowl) published
328 ?. =(source.listing our:bowl) published
318− (~(put by directory) hash.listing listing)
329+ (~(put by published) hash.listing listing)
319 =. cor (emit (invent:gossip %directory-listing !>(listing)))
330 =. cor (emit (invent:gossip %directory-listing !>(listing)))
321 ++ di-receive
332 ++ di-receive