mirror of
https://github.com/urbit/shrub.git
synced 2024-11-29 06:45:42 +03:00
54 lines
1023 B
Plaintext
54 lines
1023 B
Plaintext
/- sur=chat-view, *rw-security
|
|
^?
|
|
=< [sur .]
|
|
=, sur
|
|
|%
|
|
++ dejs
|
|
|%
|
|
++ action
|
|
|= jon=json
|
|
^- ^action
|
|
=, dejs:format
|
|
=< (parse-json jon)
|
|
|%
|
|
++ parse-json
|
|
%- of
|
|
:~ [%create create]
|
|
[%delete delete]
|
|
[%join join]
|
|
[%groupify groupify]
|
|
==
|
|
::
|
|
++ create
|
|
%- ot
|
|
:~ [%title so]
|
|
[%description so]
|
|
[%app-path pa]
|
|
[%group-path pa]
|
|
[%security sec]
|
|
[%members (as (su ;~(pfix sig fed:ag)))]
|
|
[%allow-history bo]
|
|
==
|
|
::
|
|
++ delete
|
|
(ot [%app-path pa]~)
|
|
::
|
|
++ join
|
|
%- ot
|
|
:~ [%ship (su ;~(pfix sig fed:ag))]
|
|
[%app-path pa]
|
|
[%ask-history bo]
|
|
==
|
|
::
|
|
++ groupify
|
|
=- (ot [%app-path pa] [%existing -] ~)
|
|
(mu (ot [%group-path pa] [%inclusive bo] ~))
|
|
::
|
|
++ sec
|
|
=, dejs:format
|
|
^- $-(json rw-security)
|
|
(su (perk %channel %village %journal %mailbox ~))
|
|
--
|
|
--
|
|
--
|