Merge pull request #2258 from urbit/m/chat-hook-eval

chat-hook: evaluate result-less %code messages
This commit is contained in:
Logan 2020-02-10 10:59:25 -08:00 committed by GitHub
commit 5d84ec37c9
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)]~