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 update:store
%contact-update %contact-update
%contact-push-hook %contact-push-hook
0 0
%.y :: necessary to enable p2p %.y :: necessary to enable p2p
== ==
-- --

View File

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

View File

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

View File

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