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 ++ initial-watch
|= [=path =resource:res] |= [=path =resource:res]
^- vase ^- vase
|^
?> (is-allowed:con src.bowl) ?> (is-allowed:con src.bowl)
!> ^- update:store !> ^- update:store
=/ contact=(unit contact:store) (get-contact:con our.bowl) [%initial rolo %.n]
:+ %add ::
our.bowl ++ rolo
?^ contact u.contact ^- rolodex:store
*contact: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 ++ take-update
|= =vase |= =vase

View File

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