mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
chat-hook: evaluate result-less %code messages
Prior to sending them out to the messaging target.
This commit is contained in:
parent
96cccc7665
commit
b876716f0d
@ -3,7 +3,7 @@
|
|||||||
:: allow sending chat messages to foreign paths based on write perms
|
:: allow sending chat messages to foreign paths based on write perms
|
||||||
::
|
::
|
||||||
/- *permission-store, *chat-hook, *invite-store
|
/- *permission-store, *chat-hook, *invite-store
|
||||||
/+ *chat-json, default-agent, verb
|
/+ *chat-json, *chat-eval, default-agent, verb
|
||||||
|%
|
|%
|
||||||
+$ card card:agent:gall
|
+$ card card:agent:gall
|
||||||
::
|
::
|
||||||
@ -127,6 +127,10 @@
|
|||||||
?: (team:title our.bol src.bol)
|
?: (team:title our.bol src.bol)
|
||||||
?. (~(has by synced) path.act)
|
?. (~(has by synced) path.act)
|
||||||
~
|
~
|
||||||
|
=* letter letter.envelope.act
|
||||||
|
=? letter &(?=(%code -.letter) ?=(~ output.letter))
|
||||||
|
=/ =hoon (ream expression.letter)
|
||||||
|
letter(output (eval bol hoon))
|
||||||
=/ ship (~(got by synced) path.act)
|
=/ ship (~(got by synced) path.act)
|
||||||
=/ appl ?:(=(ship our.bol) %chat-store %chat-hook)
|
=/ appl ?:(=(ship our.bol) %chat-store %chat-hook)
|
||||||
[%pass / %agent [ship appl] %poke %chat-action !>(act)]~
|
[%pass / %agent [ship appl] %poke %chat-action !>(act)]~
|
||||||
|
Loading…
Reference in New Issue
Block a user