mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-25 07:52:59 +03:00
contact-hooks: update for versioning
This commit is contained in:
parent
37ab1b7b2a
commit
b9206aacec
@ -10,6 +10,7 @@
|
||||
update:store
|
||||
%contact-update
|
||||
%contact-push-hook
|
||||
0 0
|
||||
%.y :: necessary to enable p2p
|
||||
==
|
||||
--
|
||||
|
@ -11,6 +11,7 @@
|
||||
update:store
|
||||
%contact-update
|
||||
%contact-pull-hook
|
||||
0 0
|
||||
==
|
||||
::
|
||||
+$ agent (push-hook:push-hook config)
|
||||
|
@ -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]
|
||||
::
|
||||
|
@ -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
|
||||
|
16
pkg/arvo/mar/contact/update-0.hoon
Normal file
16
pkg/arvo/mar/contact/update-0.hoon
Normal file
@ -0,0 +1,16 @@
|
||||
/+ *contact-store
|
||||
::
|
||||
|_ upd=update
|
||||
++ grad %noun
|
||||
++ grow
|
||||
|%
|
||||
++ noun upd
|
||||
++ json (update:enjs upd)
|
||||
--
|
||||
::
|
||||
++ grab
|
||||
|%
|
||||
++ noun update
|
||||
++ json update:dejs
|
||||
--
|
||||
--
|
Loading…
Reference in New Issue
Block a user