mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-12 15:01:38 +03:00
Merge branch 'lf/fix-sane'
This commit is contained in:
commit
64a62e9f85
@ -37,79 +37,13 @@
|
||||
++ on-init on-init:def
|
||||
++ on-save !>(~)
|
||||
++ on-load on-load:def
|
||||
++ on-poke
|
||||
|= [=mark =vase]
|
||||
^- (quip card _this)
|
||||
|^
|
||||
?. =(mark %sane)
|
||||
(on-poke:def mark vase)
|
||||
[(sane !<(?(%check %fix) vase)) this]
|
||||
::
|
||||
++ scry-sharing
|
||||
.^ (set resource)
|
||||
%gx
|
||||
(scot %p our.bowl)
|
||||
%group-push-hook
|
||||
(scot %da now.bowl)
|
||||
/sharing/noun
|
||||
==
|
||||
::
|
||||
++ sane
|
||||
|= input=?(%check %fix)
|
||||
^- (list card)
|
||||
=; cards=(list card)
|
||||
?: =(%check input)
|
||||
~&(cards ~)
|
||||
cards
|
||||
%+ murn
|
||||
~(tap in scry-sharing)
|
||||
|= rid=resource
|
||||
^- (unit card)
|
||||
=/ u-g=(unit group)
|
||||
(scry-group:grp rid)
|
||||
?~ u-g
|
||||
`(poke-us %remove rid)
|
||||
=* group u.u-g
|
||||
=/ subs=(set ship)
|
||||
(get-subscribers-for-group rid)
|
||||
=/ to-remove=(set ship)
|
||||
(~(dif in members.group) (~(gas in subs) our.bowl ~))
|
||||
?~ to-remove ~
|
||||
`(poke-store %remove-members rid to-remove)
|
||||
::
|
||||
++ poke-us
|
||||
|= =action:push-hook
|
||||
^- card
|
||||
=- [%pass / %agent [our.bowl %group-push-hook] %poke -]
|
||||
push-hook-action+!>(action)
|
||||
::
|
||||
++ poke-store
|
||||
|= =update:store
|
||||
^- card
|
||||
=+ group-update-0+!>(update)
|
||||
[%pass /sane %agent [our.bowl %group-store] %poke -]
|
||||
::
|
||||
++ get-subscribers-for-group
|
||||
|= rid=resource
|
||||
^- (set ship)
|
||||
=/ target=path
|
||||
(en-path:resource rid)
|
||||
%- ~(gas in *(set ship))
|
||||
%+ murn
|
||||
~(val by sup.bowl)
|
||||
|= [her=ship =path]
|
||||
^- (unit ship)
|
||||
?. =(path resource+target)
|
||||
~
|
||||
`her
|
||||
--
|
||||
|
||||
++ on-agent on-agent:def
|
||||
++ on-watch on-watch:def
|
||||
++ on-leave on-leave:def
|
||||
++ on-peek on-peek:def
|
||||
++ on-arvo on-arvo:def
|
||||
++ on-fail on-fail:def
|
||||
++ on-poke on-poke:def
|
||||
++ on-agent on-agent:def
|
||||
++ on-watch on-watch:def
|
||||
++ on-leave on-leave:def
|
||||
++ on-peek on-peek:def
|
||||
++ on-arvo on-arvo:def
|
||||
++ on-fail on-fail:def
|
||||
::
|
||||
++ transform-proxy-update
|
||||
|= vas=vase
|
||||
|
@ -7,9 +7,7 @@
|
||||
::
|
||||
++ supported-apps
|
||||
^- (list term)
|
||||
:~ %group-push-hook
|
||||
%group-store
|
||||
==
|
||||
~[%group-store]
|
||||
::
|
||||
++ poke-all-sane
|
||||
|= =input
|
||||
|
Loading…
Reference in New Issue
Block a user