urbit/pkg/arvo/lib/chat-view.hoon

57 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-04-30 06:29:06 +03:00
/- sur=chat-view, *rw-security
2020-06-02 09:24:37 +03:00
/+ group-store
2020-04-30 06:29:06 +03:00
^?
=< [sur .]
=, sur
|%
++ dejs
|%
++ action
|= jon=json
^- ^action
=, dejs:format
=< (parse-json jon)
|%
++ parse-json
2020-04-29 11:36:12 +03:00
%- of
:~ [%create create]
[%delete delete]
[%join join]
[%groupify groupify]
[%invite invite]
2020-04-29 11:36:12 +03:00
==
::
++ create
2020-04-29 11:36:12 +03:00
%- ot
:~ [%title so]
[%description so]
[%app-path pa]
[%group-path pa]
2020-06-02 09:24:37 +03:00
[%policy policy:dejs:group-store]
2020-04-29 11:36:12 +03:00
[%members (as (su ;~(pfix sig fed:ag)))]
[%allow-history bo]
[%managed bo]
2020-04-29 11:36:12 +03:00
==
::
++ delete
2020-04-29 11:36:12 +03:00
(ot [%app-path pa]~)
::
++ join
2020-04-29 11:36:12 +03:00
%- ot
:~ [%ship (su ;~(pfix sig fed:ag))]
[%app-path pa]
[%ask-history bo]
==
::
++ groupify
2020-04-29 11:36:12 +03:00
=- (ot [%app-path pa] [%existing -] ~)
(mu (ot [%group-path pa] [%inclusive bo] ~))
++ invite
%- ot
:~ app-path+pa
ships+(as (su ;~(pfix sig fed:ag)))
==
--
--
--