contact-hooks: update for versioning

This commit is contained in:
Liam Fitzgerald 2021-03-11 14:10:32 +10:00
parent 37ab1b7b2a
commit b9206aacec
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
5 changed files with 23 additions and 5 deletions

View File

@ -10,6 +10,7 @@
update:store
%contact-update
%contact-push-hook
0 0
%.y :: necessary to enable p2p
==
--

View File

@ -11,6 +11,7 @@
update:store
%contact-update
%contact-pull-hook
0 0
==
::
+$ agent (push-hook:push-hook config)

View File

@ -71,7 +71,7 @@
++ give
|= =update:store
^- (list card)
[%give %fact ~ [%contact-update !>(update)]]~
[%give %fact ~ [%contact-update-0 !>(update)]]~
--
::
++ on-poke
@ -81,7 +81,7 @@
|^
=^ cards state
?+ mark (on-poke:def mark vase)
%contact-update (update !<(update:store vase))
%contact-update-0 (update !<(update:store vase))
%import (import q.vase)
==
[cards this]
@ -203,7 +203,7 @@
?: our
[/updates /our /all ~]
[/updates /all ~]
[%give %fact paths %contact-update !>(update)]~
[%give %fact paths %contact-update-0 !>(update)]~
--
::
++ import
@ -223,7 +223,7 @@
=/ =ship (slav %p i.t.t.path)
=/ contact=(unit contact:store) (~(get by rolodex) ship)
?~ contact [~ ~]
:- ~ :- ~ :- %contact-update
:- ~ :- ~ :- %contact-update-0
!> ^- update:store
[%add ship u.contact]
::

View File

@ -83,7 +83,7 @@
%kick [~[watch-contacts] state]
::
%fact
?> ?=(%contact-update p.cage.sign)
?> ?=(%contact-update-0 p.cage.sign)
=+ !<(=update:contact q.cage.sign)
?+ -.update `state
%add

View File

@ -0,0 +1,16 @@
/+ *contact-store
::
|_ upd=update
++ grad %noun
++ grow
|%
++ noun upd
++ json (update:enjs upd)
--
::
++ grab
|%
++ noun update
++ json update:dejs
--
--