2021-09-06 06:31:11 +03:00
|
|
|
/- *post, met=metadata-store, hark=hark-graph-hook
|
|
|
|
/+ graph=graph-store
|
2020-08-18 20:32:04 +03:00
|
|
|
|_ i=indexed-post
|
|
|
|
++ grow
|
|
|
|
|%
|
|
|
|
++ noun i
|
2021-01-26 07:54:29 +03:00
|
|
|
::
|
2021-06-03 21:56:22 +03:00
|
|
|
++ graph-indexed-post
|
|
|
|
^- indexed-post
|
|
|
|
?+ index.p.i ~|(index+index.p.i !!)
|
|
|
|
:: top-level link post; title and url
|
|
|
|
::
|
|
|
|
[@ ~]
|
|
|
|
?> ?=([[%text @] $%([%url @] [%reference *]) ~] contents.p.i)
|
|
|
|
i
|
|
|
|
::
|
|
|
|
:: comment on link post; container structure
|
|
|
|
::
|
|
|
|
[@ @ ~]
|
|
|
|
?> ?=(~ contents.p.i)
|
|
|
|
i
|
|
|
|
::
|
|
|
|
:: comment on link post; comment text
|
|
|
|
::
|
|
|
|
[@ @ @ ~]
|
|
|
|
?> ?=(^ contents.p.i)
|
|
|
|
i
|
|
|
|
==
|
|
|
|
::
|
2021-01-26 07:54:29 +03:00
|
|
|
++ graph-permissions-add
|
|
|
|
|= vip=vip-metadata:met
|
2021-03-30 20:20:32 +03:00
|
|
|
^- permissions:graph
|
2021-01-26 07:54:29 +03:00
|
|
|
=/ reader
|
|
|
|
?=(%reader-comments vip)
|
|
|
|
?+ index.p.i !!
|
|
|
|
[@ ~] [%yes %yes %no]
|
|
|
|
[@ @ ~] [%yes %yes ?:(reader %yes %no)]
|
|
|
|
[@ @ @ ~] [%self %self %self]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ graph-permissions-remove
|
|
|
|
|= vip=vip-metadata:met
|
2021-03-30 20:20:32 +03:00
|
|
|
^- permissions:graph
|
2021-01-26 07:54:29 +03:00
|
|
|
=/ reader
|
|
|
|
?=(%reader-comments vip)
|
|
|
|
?+ index.p.i !!
|
|
|
|
[@ ~] [%yes %self %self]
|
|
|
|
[@ @ ~] [%yes %self %self]
|
|
|
|
[@ @ @ ~] [%yes %self %self]
|
|
|
|
==
|
|
|
|
::
|
2020-10-21 09:01:14 +03:00
|
|
|
++ notification-kind
|
2021-09-06 06:31:11 +03:00
|
|
|
|= title=cord
|
2021-03-30 20:20:32 +03:00
|
|
|
^- (unit notif-kind:hark)
|
2020-10-21 09:01:14 +03:00
|
|
|
?+ index.p.i ~
|
2021-09-06 06:31:11 +03:00
|
|
|
[@ ~]
|
|
|
|
:- ~
|
|
|
|
:* [text+(rap 3 'New links in ' title ~)]~
|
|
|
|
[ship+author.p.i text+': ' (hark-contents:graph contents.p.i)]
|
|
|
|
[0 1] %each %children
|
|
|
|
==
|
|
|
|
|
|
|
|
|
|
|
|
[@ @ %1 ~]
|
|
|
|
:- ~
|
|
|
|
:* [text+(rap 3 'New comments on a post in ' title ~)]~
|
|
|
|
[ship+author.p.i text+': ' (hark-contents:graph contents.p.i)]
|
|
|
|
[1 2] %count %siblings
|
|
|
|
==
|
|
|
|
|
2020-10-21 09:01:14 +03:00
|
|
|
==
|
2021-02-23 01:54:45 +03:00
|
|
|
::
|
|
|
|
++ transform-add-nodes
|
2021-02-24 21:25:53 +03:00
|
|
|
|= [=index =post =atom was-parent-modified=?]
|
2021-02-23 01:54:45 +03:00
|
|
|
^- [^index ^post]
|
2021-02-24 21:25:53 +03:00
|
|
|
=- [- post(index -)]
|
|
|
|
?+ index ~|(transform+[index post] !!)
|
|
|
|
[@ ~] [atom ~]
|
|
|
|
[@ @ ~] [i.index atom ~]
|
|
|
|
[@ @ @ ~]
|
|
|
|
?: was-parent-modified
|
2021-02-25 21:41:17 +03:00
|
|
|
[i.index atom i.t.t.index ~]
|
|
|
|
index
|
2021-02-24 21:25:53 +03:00
|
|
|
==
|
2020-08-18 20:32:04 +03:00
|
|
|
--
|
|
|
|
++ grab
|
|
|
|
|%
|
2021-06-03 21:56:22 +03:00
|
|
|
++ noun indexed-post
|
2020-08-18 20:32:04 +03:00
|
|
|
--
|
|
|
|
++ grad %noun
|
|
|
|
--
|