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/lib/nostrill/comms.hoon | |
parent | 4b016c908dda2019f3bf89e5a3d2eae535e5fbd2 (diff) |
fuck yeah
Diffstat (limited to 'desk/lib/nostrill/comms.hoon')
-rw-r--r-- | desk/lib/nostrill/comms.hoon | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/desk/lib/nostrill/comms.hoon b/desk/lib/nostrill/comms.hoon index 87a63b2..23e442a 100644 --- a/desk/lib/nostrill/comms.hoon +++ b/desk/lib/nostrill/comms.hoon @@ -38,7 +38,8 @@ =/ prof (~(get by profiles.state) [%urbit our.bowl]) (res-fact [%ok %feed fc prof] pat) -++ give-ted |= [id=@ pat=path] + +++ give-ted |= [id=@ pat=path] =/ ted (get:orm:feed feed.state id) ?~ ted (res-fact [%ng 'no such thread'] pat) @@ -70,15 +71,20 @@ =/ =poke:comms [%res res] =/ cage [%noun !>(poke)] [%pass /poke %agent [src.bowl dap.bowl] %poke cage] + ++ res-fact |= [=res:comms pat=path] ^- (list card:agent:gall) + =/ beg ?=([%beg *] pat) =/ paths ~[pat] - =/ =poke:comms [%res res] - ~& > giving-res-fact=res - =/ jon (beg-res:en:jsonlib res) - =/ cage [%json !>(jon)] - :~ - [%give %fact paths cage] - [%give %kick paths ~] - == + ~& > giving-res-fact=pat + ?: beg :: for the thread that goes directly to the frontend + =/ jon (beg-res:en:jsonlib res) + =/ cage [%json !>(jon)] + =/ c1 [%give %fact paths cage] + =/ c2 [%give %kick paths ~] + :~(c1 c2) + :: for the follow flow + =/ cage [%noun !>(res)] + =/ c1 [%give %fact paths cage] + :~(c1) -- |