chat-hook: evaluate result-less %code messages

Prior to sending them out to the messaging target.
This commit is contained in:
Fang 2020-02-10 16:34:37 +01:00 committed by GitHub
parent 96cccc7665
commit b876716f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@
:: allow sending chat messages to foreign paths based on write perms
::
/- *permission-store, *chat-hook, *invite-store
/+ *chat-json, default-agent, verb
/+ *chat-json, *chat-eval, default-agent, verb
|%
+$ card card:agent:gall
::
@ -127,6 +127,10 @@
?: (team:title our.bol src.bol)
?. (~(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)
=/ appl ?:(=(ship our.bol) %chat-store %chat-hook)
[%pass / %agent [ship appl] %poke %chat-action !>(act)]~