group-hook: on-load, re-establish subscriptions

For every item in the synced map that doesn't have a matching outgoing
subscription, re-establish the subscription we expect to have.
This commit is contained in:
Fang 2020-03-26 20:19:18 +01:00
parent ea48161334
commit 22bb2a0d86
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -34,7 +34,22 @@
++ on-save !>(state)
++ on-load
|= old=vase
`this(state !<(state-zero old))
^- (quip card _this)
:_ this(state !<(state-zero old))
%+ murn
~(tap by synced)
|= [=path =ship]
^- (unit card)
=/ =wire
[(scot %p ship) %group path]
=/ =term
?: =(our.bowl ship)
%group-store
%group-hook
?: (~(has by wex.bowl) [wire ship term])
~
`[%pass wire %agent [ship term] %watch [%group path]]
::
++ on-leave on-leave:def
++ on-peek on-peek:def
++ on-arvo on-arvo:def