From e9344bf78dcb9fa8cff9482ee9a4a4d7b0c00448 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 9 Feb 2021 11:46:34 +1000 Subject: [PATCH] contact-pull-hook: migrate old groups --- pkg/arvo/app/contact-pull-hook.hoon | 22 +++++++++++++++++++--- pkg/arvo/lib/agentio.hoon | 5 +++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/app/contact-pull-hook.hoon b/pkg/arvo/app/contact-pull-hook.hoon index ce880de68..e275ec518 100644 --- a/pkg/arvo/app/contact-pull-hook.hoon +++ b/pkg/arvo/app/contact-pull-hook.hoon @@ -1,5 +1,6 @@ /- *resource -/+ store=contact-store, contact, default-agent, verb, dbug, pull-hook +/+ store=contact-store, contact, default-agent, verb, dbug, pull-hook, agentio +/+ grpl=group ~% %contact-pull-hook-top ..part ~ |% +$ card card:agent:gall @@ -23,11 +24,26 @@ def ~(. (default-agent this %|) bowl) dep ~(. (default:pull-hook this config) bowl) con ~(. contact bowl) + io ~(. agentio bowl) + grp ~(. grpl bowl) :: -++ on-init on-init:def +++ on-init + ^- (quip card _this) + :_ this + (poke-self:pass:io noun+!>(%upgrade))^~ + ++ on-save !>(~) ++ on-load on-load:def -++ on-poke on-poke:def +++ on-poke + |= [=mark =vase] + ^- (quip card _this) + ?. ?=(%noun mark) (on-poke:def mark vase) + :_ this + %+ murn ~(tap in scry-groups:grp) + |= rid=resource + ?: =(our.bowl entity.rid) ~ + `(poke-self:pass:io pull-hook-action+!>([%add [entity .]:rid])) +:: ++ on-peek on-peek:def ++ on-arvo on-arvo:def ++ on-fail on-fail:def diff --git a/pkg/arvo/lib/agentio.hoon b/pkg/arvo/lib/agentio.hoon index c9eb54756..8af4935fe 100644 --- a/pkg/arvo/lib/agentio.hoon +++ b/pkg/arvo/lib/agentio.hoon @@ -23,6 +23,11 @@ ^- card (poke [our.bowl app] cage) :: + ++ poke-self + |= =cage + ^- card + (poke-our dap.bowl cage) + :: ++ arvo |= =note-arvo ^- card