mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-20 23:18:00 +03:00
chat-cli: Simplify message command type & logic
By dropping support for •-separated multi-messaging, we can simplify the parsing and handling of message sending inputs.
This commit is contained in:
parent
dac51a9ed8
commit
c7fbad61ee
@ -37,7 +37,7 @@
|
|||||||
::
|
::
|
||||||
+$ command
|
+$ command
|
||||||
$% [%target (set target)] :: set messaging target
|
$% [%target (set target)] :: set messaging target
|
||||||
[%say (list letter)] :: send message
|
[%say letter] :: send message
|
||||||
[%eval cord hoon] :: send #-message
|
[%eval cord hoon] :: send #-message
|
||||||
::
|
::
|
||||||
[%create chat-security path (unit glyph)] :: create chat
|
[%create chat-security path (unit glyph)] :: create chat
|
||||||
@ -460,17 +460,16 @@
|
|||||||
(stag 0 dem:ag)
|
(stag 0 dem:ag)
|
||||||
(cook lent (star mic))
|
(cook lent (star mic))
|
||||||
==
|
==
|
||||||
:: +message: lin, url, or #exp message
|
:: +message: all messages
|
||||||
::
|
::
|
||||||
++ message
|
++ message
|
||||||
;~ pose
|
;~ pose
|
||||||
;~(plug (cold %eval hax) expr)
|
;~(plug (cold %eval hax) expr)
|
||||||
(stag %say letters)
|
(stag %say letter)
|
||||||
==
|
==
|
||||||
:: +letters: •-separated text or url messages
|
:: +letter: simple messages
|
||||||
::
|
::
|
||||||
++ letters
|
++ letter
|
||||||
%+ most (jest '•')
|
|
||||||
;~ pose
|
;~ pose
|
||||||
(stag %url turl)
|
(stag %url turl)
|
||||||
:(stag %me ;~(pfix vat text))
|
:(stag %me ;~(pfix vat text))
|
||||||
@ -665,7 +664,7 @@
|
|||||||
:: +say: send messages
|
:: +say: send messages
|
||||||
::
|
::
|
||||||
++ say
|
++ say
|
||||||
|= letters=(list letter)
|
|= =letter
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
=/ =serial (shaf %msg-uid eny.bowl)
|
=/ =serial (shaf %msg-uid eny.bowl)
|
||||||
:_ this(eny.bowl (shax eny.bowl))
|
:_ this(eny.bowl (shax eny.bowl))
|
||||||
@ -675,12 +674,7 @@
|
|||||||
%^ act %out-message %chat-hook
|
%^ act %out-message %chat-hook
|
||||||
:- %chat-action
|
:- %chat-action
|
||||||
:+ %message (target-to-path target)
|
:+ %message (target-to-path target)
|
||||||
:* serial
|
[serial *@ our-self now.bowl letter]
|
||||||
*@
|
|
||||||
our-self
|
|
||||||
now.bowl
|
|
||||||
(snag 0 letters) ::TODO support multiple
|
|
||||||
==
|
|
||||||
:: +eval: run hoon, send code and result as message
|
:: +eval: run hoon, send code and result as message
|
||||||
::
|
::
|
||||||
:: this double-virtualizes and clams to disable .^ for security reasons
|
:: this double-virtualizes and clams to disable .^ for security reasons
|
||||||
@ -688,7 +682,7 @@
|
|||||||
++ eval
|
++ eval
|
||||||
|= [txt=cord exe=hoon]
|
|= [txt=cord exe=hoon]
|
||||||
=; tan=(list tank)
|
=; tan=(list tank)
|
||||||
(say [%code txt tan] ~)
|
(say %code txt tan)
|
||||||
;; (list tank)
|
;; (list tank)
|
||||||
=< +>
|
=< +>
|
||||||
%+ mong
|
%+ mong
|
||||||
|
Loading…
Reference in New Issue
Block a user