From a968bb004b35ea3d33bade7fc70370f55f213369 Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Thu, 1 Oct 2020 21:27:57 -0500 Subject: [PATCH] chat-hook: fix infinite loop from reconnecting to own dm --- pkg/arvo/app/chat-hook.hoon | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/arvo/app/chat-hook.hoon b/pkg/arvo/app/chat-hook.hoon index e9e6e8820..c4141470b 100644 --- a/pkg/arvo/app/chat-hook.hoon +++ b/pkg/arvo/app/chat-hook.hoon @@ -92,6 +92,17 @@ ?: ?=(%10 -.old) [cards this(state old)] ?: ?=(%9 -.old) + =. cards + %+ weld cards + ^- (list card) + %+ roll ~(tap in ~(key by wex.bol)) + |= [[=wire =ship =term] out=(list card)] + ?> ?=([@ *] wire) + ?. ?&(=(ship our.bol) =(term %chat-hook)) + out + :_ out + =- [%pass / %agent [our.bol %chat-hook] %poke %chat-hook-action !>(-)] + [%remove t.wire] =/ chat-keys=(set path) (scry-for (set path) %chat-store [%keys ~]) =. cards %+ weld cards