diff options
author | polwex <polwex@sortug.com> | 2025-09-18 03:48:14 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-09-18 03:48:14 +0700 |
commit | ad7ebd1756956724e0b167d88f924e707401a9aa (patch) | |
tree | 5f29ab38e41224245a93a2a00318b835278ac596 /desk/app/nostrill.hoon | |
parent | 4b016c908dda2019f3bf89e5a3d2eae535e5fbd2 (diff) |
fuck yeah
Diffstat (limited to 'desk/app/nostrill.hoon')
-rw-r--r-- | desk/app/nostrill.hoon | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/desk/app/nostrill.hoon b/desk/app/nostrill.hoon index cbd1c2f..611830f 100644 --- a/desk/app/nostrill.hoon +++ b/desk/app/nostrill.hoon @@ -1,7 +1,7 @@ /- sur=nostrill, nsur=nostr /+ lib=nostrill, nlib=nostr, sr=sortug, shim, dbug, muta=nostrill-mutations, jsonlib=json-nostrill, - trill=trill-post, comms=nostrill-comms, followlib=follows + trill=trill-post, comms=nostrill-comms, followlib=nostrill-follows /= web /web/router |% +$ versioned-state $%(state-0:sur) @@ -32,11 +32,11 @@ ++ on-load |~ old-state=vase ^- (quip card:agent:gall agent:gall) - :: =/ old-state !<(versioned-state old-state) - :: ?- -.old-state - :: %0 `this(state old-state) - :: == - `this(state (default-state:lib bowl)) + =/ old-state !<(versioned-state old-state) + ?- -.old-state + %0 `this(state old-state) + == + :: `this(state (default-state:lib bowl)) :: ++ on-poke |~ [=mark =vase] @@ -239,6 +239,11 @@ =/ =fact:ui:sur [%post %add *post-wrapper:sur] =/ card (update-ui:cards fact) :_ this :~(card) + %kick + :_ this =/ subs ~(tap by sup.bowl) + %+ turn subs |= [* p=@p pat=path] + [%give %kick ~[pat] ~] + == :: @@ -279,9 +284,22 @@ ++ on-agent |~ [wire=(pole knot) =sign:agent:gall] ^- (quip card:agent:gall agent:gall) - ~& on-agent=wire - ~& on-agent=sign - `this + ~& on-agent=[wire -.sign] + :: if p.sign is not ~ here that means it's intentional + ?+ wire `this + [%refollow ~] + ?. ?=(%watch-ack -.sign) `this + ?~ p.sign `this + =^ cs state (handle-kick-nack:fols src.bowl) [cs this] + [%follow ~] + ?: ?=(%kick -.sign) + =^ cs state (handle-refollow:fols src.bowl) + [cs this] + ?. ?=(%fact -.sign) `this + =^ cs state (handle-agent-res:fols q.q.cage.sign) + [cs this] + + == :: ++ on-arvo |~ [wire=(pole knot) =sign-arvo] |