chat-hook: fix infinite loop from reconnecting to own dm

This commit is contained in:
Logan Allen 2020-10-01 21:27:57 -05:00
parent 2c0ddfa960
commit a968bb004b

View File

@ -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