shrub/pkg/arvo/ted/sane.hoon
Liam Fitzgerald 2caf1dac24
group-push-hook: kick members who are not subscribed
If a ship breaches, it may no longer be subscribed to the group, but
still be in it. This causes DM breakage amongst other things. To fix it,
we loop over the incoming subscriptions and kick everyone who is a part
of a group, but not subscribed to it.
2020-12-03 16:00:57 +10:00

32 lines
536 B
Plaintext

/- spider
/+ *strandio
=>
|%
++ strand strand:spider
::
++ supported-apps
^- (list term)
:~ %graph-pull-hook
%group-pull-hook
%group-push-hook
==
::
++ poke-all-sane
=/ m (strand ,~)
^- form:m
=/ apps supported-apps
|- =* loop $
?~ apps
(pure:m ~)
=* app i.apps
;< ~ bind:m (poke-our app sane+!>(%sane))
loop(apps t.apps)
--
::
^- thread:spider
|= vase
=/ m (strand ,vase)
;< ~ bind:m poke-all-sane
;< ~ bind:m (poke-our %sane noun+!>(%fix))
(pure:m !>("Done"))