summaryrefslogtreecommitdiff
path: root/desk/lib/json/trill.hoon
diff options
context:
space:
mode:
Diffstat (limited to 'desk/lib/json/trill.hoon')
-rw-r--r--desk/lib/json/trill.hoon30
1 files changed, 29 insertions, 1 deletions
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)
::
--
--