chat: Refactor to use ?- in chat update JSON serialization
^- json
%+ frond %chat-update
%- pairs
- :~
- ?: ?=(%initial -.upd)
+ :_ ~
+ ?- -.upd
+ %initial
:- %initial
%- pairs
%+ turn ~(tap by inbox.upd)
:~ [%envelopes [%a (turn envelopes.mailbox envelope)]]
[%config (config config.mailbox)]
==
- ?: ?=(%message -.upd)
+ ::
+ %message
:- %message
%- pairs
:~ [%path (path path.upd)]
[%envelope (envelope envelope.upd)]
==
- ?: ?=(%messages -.upd)
+ ::
+ %messages
:- %messages
%- pairs
:~ [%path (path path.upd)]
[%end (numb end.upd)]
[%envelopes [%a (turn envelopes.upd envelope)]]
==
- ?: ?=(%read -.upd)
+ ::
+ %read
[%read (pairs [%path (path path.upd)]~)]
- ?: ?=(%create -.upd)
+ ::
+ %create
[%create (pairs [%path (path path.upd)]~)]
- ?: ?=(%delete -.upd)
+ ::
+ %delete
[%delete (pairs [%path (path path.upd)]~)]
- ?> ?=(%keys -.upd)
+ ::
+ %keys
:- %keys
:- %a
%+ turn ~(tap by keys.upd)
