2020-10-22 20:17:15 +03:00
|
|
|
/- spider,
|
|
|
|
graph=graph-store,
|
2021-01-30 01:52:04 +03:00
|
|
|
met=metadata-store,
|
2020-10-22 20:17:15 +03:00
|
|
|
*group,
|
|
|
|
group-store,
|
2021-02-01 09:27:38 +03:00
|
|
|
inv=invite-store,
|
|
|
|
push-hook
|
2020-09-04 10:42:20 +03:00
|
|
|
/+ strandio, resource, graph-view
|
2020-09-02 08:18:07 +03:00
|
|
|
=>
|
|
|
|
|%
|
|
|
|
++ strand strand:spider
|
|
|
|
++ poke poke:strandio
|
|
|
|
++ poke-our poke-our:strandio
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-02 08:18:07 +03:00
|
|
|
++ handle-group
|
2020-09-04 10:42:20 +03:00
|
|
|
|= [rid=resource =associated:graph-view]
|
2020-09-02 08:18:07 +03:00
|
|
|
=/ m (strand ,resource)
|
2020-09-04 10:42:20 +03:00
|
|
|
?: ?=(%group -.associated)
|
|
|
|
(pure:m rid.associated)
|
2021-02-01 09:27:38 +03:00
|
|
|
=/ push-hook-act=cage
|
|
|
|
:- %push-hook-action
|
|
|
|
!> ^- action:push-hook
|
|
|
|
[%add rid]
|
2021-02-01 07:07:39 +03:00
|
|
|
;< ~ bind:m
|
2021-02-01 09:27:38 +03:00
|
|
|
(poke-our %metadata-push-hook push-hook-act)
|
2021-11-17 23:59:42 +03:00
|
|
|
;< ~ bind:m
|
|
|
|
(poke-our %contact-push-hook push-hook-act)
|
2021-02-01 09:27:38 +03:00
|
|
|
;< ~ bind:m
|
|
|
|
%+ poke-our %group-store
|
2021-03-18 06:53:57 +03:00
|
|
|
:- %group-update-0
|
2021-02-01 09:27:38 +03:00
|
|
|
!> ^- update:group-store
|
|
|
|
[%add-group rid policy.associated %.y]
|
|
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
|
|
|
;< ~ bind:m
|
2021-03-18 06:53:57 +03:00
|
|
|
(poke-our %group-store group-update-0+!>([%add-members rid (sy our.bowl ~)]))
|
2021-02-01 09:27:38 +03:00
|
|
|
;< ~ bind:m
|
|
|
|
(poke-our %group-push-hook push-hook-act)
|
2022-04-15 23:32:18 +03:00
|
|
|
;< ~ bind:m
|
|
|
|
(poke-our %hark-graph-hook hark-graph-hook-action+!>([%listen rid /]))
|
2020-09-02 08:18:07 +03:00
|
|
|
(pure:m rid)
|
|
|
|
--
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-02 08:18:07 +03:00
|
|
|
=, strand=strand:spider
|
|
|
|
^- thread:spider
|
|
|
|
|= arg=vase
|
|
|
|
=/ m (strand ,vase)
|
|
|
|
^- form:m
|
2020-12-02 01:38:02 +03:00
|
|
|
=+ !<([~ =action:graph-view] arg)
|
2020-09-02 08:18:07 +03:00
|
|
|
?> ?=(%create -.action)
|
|
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
2020-10-22 20:17:15 +03:00
|
|
|
::
|
2020-09-02 08:18:07 +03:00
|
|
|
:: Add graph to graph-store
|
|
|
|
::
|
2020-09-11 06:08:16 +03:00
|
|
|
?. =(our.bowl entity.rid.action)
|
|
|
|
(strand-fail:strandio %bad-request ~)
|
2020-12-10 05:36:59 +03:00
|
|
|
=/ overwrite=?
|
|
|
|
?=(%policy -.associated.action)
|
2020-09-02 08:18:07 +03:00
|
|
|
=/ =update:graph
|
2021-03-18 04:50:14 +03:00
|
|
|
[now.bowl %add-graph rid.action *graph:graph mark.action overwrite]
|
2020-09-04 10:42:20 +03:00
|
|
|
;< ~ bind:m
|
2021-09-28 02:43:36 +03:00
|
|
|
(poke-our %graph-store graph-update-3+!>(update))
|
2020-09-04 10:42:20 +03:00
|
|
|
;< ~ bind:m
|
|
|
|
(poke-our %graph-push-hook %push-hook-action !>([%add rid.action]))
|
2020-10-22 20:17:15 +03:00
|
|
|
::
|
2020-09-02 08:18:07 +03:00
|
|
|
:: Add group, if graph is unmanaged
|
|
|
|
::
|
|
|
|
;< group=resource bind:m
|
|
|
|
(handle-group rid.action associated.action)
|
2020-10-22 20:17:15 +03:00
|
|
|
::
|
2020-09-02 08:18:07 +03:00
|
|
|
:: Setup metadata
|
|
|
|
::
|
2021-01-30 01:52:04 +03:00
|
|
|
=/ =metadatum:met
|
|
|
|
%* . *metadatum:met
|
2020-09-22 20:44:52 +03:00
|
|
|
title title.action
|
|
|
|
description description.action
|
2020-09-02 08:18:07 +03:00
|
|
|
date-created now.bowl
|
2020-09-22 20:44:52 +03:00
|
|
|
creator our.bowl
|
2021-03-11 02:22:24 +03:00
|
|
|
config [%graph module.action]
|
2021-02-01 09:27:38 +03:00
|
|
|
preview %.n
|
2021-03-22 23:11:28 +03:00
|
|
|
hidden %.n
|
2020-09-02 08:18:07 +03:00
|
|
|
==
|
2021-01-30 01:52:04 +03:00
|
|
|
=/ met-action=action:met
|
2021-02-01 07:07:39 +03:00
|
|
|
[%add group graph+rid.action metadatum]
|
2020-09-02 08:18:07 +03:00
|
|
|
;< ~ bind:m
|
2021-07-09 05:54:55 +03:00
|
|
|
(poke-our %metadata-push-hook metadata-update-2+!>(met-action))
|
2020-10-22 20:17:15 +03:00
|
|
|
::
|
|
|
|
:: Send invites
|
|
|
|
::
|
2020-10-28 21:42:44 +03:00
|
|
|
?: ?=(%group -.associated.action)
|
2020-10-22 20:17:15 +03:00
|
|
|
(pure:m !>(~))
|
2020-10-27 23:45:26 +03:00
|
|
|
?- -.policy.associated.action
|
2020-10-28 21:42:44 +03:00
|
|
|
%open (pure:m !>(~))
|
2020-10-22 20:17:15 +03:00
|
|
|
%invite
|
|
|
|
=/ inv-action=action:inv
|
|
|
|
:^ %invites %graph (shaf %graph-uid eny.bowl)
|
|
|
|
^- multi-invite:inv
|
|
|
|
:* our.bowl
|
|
|
|
%graph-push-hook
|
|
|
|
rid.action
|
|
|
|
pending.policy.associated.action
|
|
|
|
description.action
|
|
|
|
==
|
|
|
|
;< ~ bind:m
|
|
|
|
(poke-our %invite-hook %invite-action !>(inv-action))
|
|
|
|
(pure:m !>(~))
|
|
|
|
==
|