shrub/pkg/arvo/ted/sane.hoon
Liam Fitzgerald 66d9fd8426
sane: fix accidental self kick
Does not remove ourselves from the group when run. Additionally adds
card preview support to the inside app pokes.

Fixes urbit/landscape#442
2021-02-16 12:24:30 +10:00

34 lines
579 B
Plaintext

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