From b876716f0dd862baffd8efd71a268e269be93a1d Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 10 Feb 2020 16:34:37 +0100 Subject: [PATCH] chat-hook: evaluate result-less %code messages Prior to sending them out to the messaging target. --- pkg/arvo/app/chat-hook.hoon | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/arvo/app/chat-hook.hoon b/pkg/arvo/app/chat-hook.hoon index d1ee0ff57..b918966eb 100644 --- a/pkg/arvo/app/chat-hook.hoon +++ b/pkg/arvo/app/chat-hook.hoon @@ -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)]~