graph-view: add json conversion and -graph-dismiss-group-feed thread

This commit is contained in:
Logan Allen 2021-03-16 13:01:17 -05:00
parent c874849203
commit 5a29e0bbcb
4 changed files with 53 additions and 1 deletions

View File

@ -18,6 +18,8 @@
groupify+groupify
eval+so
pending-indices+pending-indices
create-group-feed+create-group-feed
dismiss-group-feed+dismiss-group-feed
::invite+invite
==
::
@ -62,6 +64,16 @@
:~ group+dejs:resource
policy+policy:dejs:group-store
==
::
++ create-group-feed
%- ot
:~ resource+dejs:resource
==
::
++ dismiss-group-feed
%- ot
:~ resource+dejs:resource
==
--
--
::

View File

@ -44,6 +44,7 @@
[%eval =cord]
[%pending-indices pending=(map hash:store index:store)]
[%create-group-feed group=resource]
[%dismiss-group-feed group=resource]
==
--

View File

@ -44,7 +44,7 @@
config=md-config
picture=url
preview=?
hidden=_|
hidden=?
vip=vip-metadata
==
::

View File

@ -0,0 +1,39 @@
/- spider,
met=metadata-store
/+ strandio, resource, graph-view
::
=* strand strand:spider
=* poke-our poke-our:strandio
::
^- thread:spider
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([~ =action:graph-view] arg)
?> ?=(%dismiss-group-feed -.action)
;< =bowl:spider bind:m get-bowl:strandio
?. =(our.bowl entity.group.action)
(strand-fail:strandio %bad-request ~)
;< association=(unit association:met) bind:m
%+ scry:strandio (unit association:met)
%- zing
:~ /gx/metadata-store/metadata/groups
(en-path:resource group.action)
/noun
==
?~ association
~|('No group exists, cannot make group feed.' !!)
=* metadatum metadatum.u.association
?> ?=(%group -.config.metadatum)
?> ?| ?=(~ feed.config.metadatum)
?=([~ ^] feed.config.metadatum)
==
;< ~ bind:m
%+ poke-our %metadata-push-hook
:- %metadata-update
!> ^- action:met
:^ %add
group.action
groups+group.action
metadatum(feed.config [~ ~])
(pure:m !>(~))