shrub/pkg/landscape/mar/graph/validator/chat.hoon

53 lines
1023 B
Plaintext
Raw Normal View History

2021-09-06 06:31:11 +03:00
/- *post, met=metadata-store, hark=hark-graph-hook
/+ graph=graph-store
|_ i=indexed-post
++ grow
|%
++ noun i
2021-01-26 07:50:33 +03:00
::
++ graph-indexed-post
^- indexed-post
?> ?=([@ ~] index.p.i)
i
::
2021-01-26 07:50:33 +03:00
++ graph-permissions-add
|= vip=vip-metadata:met
^- permissions:graph
2021-01-26 07:50:33 +03:00
?+ index.p.i !!
[@ ~] [%yes %yes %no]
==
::
++ graph-permissions-remove
|= vip=vip-metadata:met
^- permissions:graph
2021-01-26 07:50:33 +03:00
?+ index.p.i !!
[@ ~] [%yes %self %no]
2021-01-26 07:50:33 +03:00
==
::
2020-11-24 08:39:53 +03:00
++ notification-kind
2021-09-06 06:31:11 +03:00
|= title=cord
^- (unit notif-kind:hark)
2020-11-24 08:39:53 +03:00
?+ index.p.i ~
2021-09-06 06:31:11 +03:00
[@ ~]
:- ~
:* ~[text+(rap 3 'New messages in ' title ~)]
[ship+author.p.i text+': ' (hark-contents:graph contents.p.i)]
[0 1] %count %none
==
2020-11-24 08:39:53 +03:00
==
::
++ transform-add-nodes
|= [=index =post =atom was-parent-modified=?]
^- [^index ^post]
=- [- post(index -)]
[atom ~]
--
::
++ grab
|%
++ noun indexed-post
--
::
++ grad %noun
--