contact-push-hook: write out initial-watch to expose proper data

This commit is contained in:
Logan Allen 2021-02-01 16:01:23 -06:00
parent c8b83eb1dd
commit d6eb1638d9
2 changed files with 15 additions and 6 deletions

View File

@ -88,13 +88,22 @@
++ initial-watch
|= [=path =resource:res]
^- vase
|^
?> (is-allowed:con src.bowl)
!> ^- update:store
=/ contact=(unit contact:store) (get-contact:con our.bowl)
:+ %add
our.bowl
?^ contact u.contact
*contact:store
[%initial rolo %.n]
::
++ rolo
^- rolodex:store
=/ ugroup (scry-group:grp resource)
?~ ugroup *rolodex:store
%- ~(gas by *rolodex:store)
%+ murn ~(tap in (members:grp resource))
|= s=ship
^- (unit [ship contact:store])
=/ c=(unit contact:store) (get-contact:con s)
?~(c ~ `[s u.c])
--
::
++ take-update
|= =vase

View File

@ -104,7 +104,7 @@
=/ our-contact (~(got by rolodex) our.bowl)
=. rolodex (~(uni by rolodex) rolo)
=. rolodex (~(put by rolodex) our.bowl our-contact)
:_ state(rolodex rolodex, is-public is-public)
:_ state(rolodex rolodex)
(send-diff [%initial rolodex is-public] %.n)
::
++ handle-add