From 985fa2f7c99832cdf3c3351d2273c8fd05402b78 Mon Sep 17 00:00:00 2001 From: polwex Date: Wed, 17 Sep 2025 21:45:18 +0700 Subject: basic comms working --- desk/lib/json/trill.hoon | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'desk/lib/json/trill.hoon') diff --git a/desk/lib/json/trill.hoon b/desk/lib/json/trill.hoon index efa4ffc..415d2f4 100644 --- a/desk/lib/json/trill.hoon +++ b/desk/lib/json/trill.hoon @@ -185,7 +185,35 @@ :~ ship+(patp:en:common ship.pid) id+(ud:en:common id.pid) == - :: + ++ full-node + |= p=full-node:post ^- json + %- pairs + :~ id+(ud:en:common id.p) + host+(patp:en:common host.p) + author+(patp:en:common author.p) + thread+(ud:en:common thread.p) + parent+?~(parent.p ~ (ud:en:common u.parent.p)) + contents+(content contents.p) + hash+(b64:en:common hash.p) + engagement+(engagement engagement.p) + children+(internal-graph children.p) + time+(time id.p) + == + ++ internal-graph + |= int=internal-graph:post ^- json + ?- -.int + %empty ~ + %full (full-graph +.int) + == + ++ full-graph + |= f=full-graph:post + ^- json + %- pairs + %+ turn (tap:form:post f) + |= [post-id=@da fn=full-node:post] + ^- [@ta json] + :- (crip (scow:sr %ud `@ud`post-id)) + (full-node fn) :: -- -- -- cgit v1.2.3