dm-hook: reload agents on dm-hook state change

This fixes the %notify bug that prevented dms from coming through.
This commit is contained in:
ryjm 2021-07-29 14:28:16 -04:00
parent d76cf9ae8b
commit 54935ece34

View File

@ -13,16 +13,18 @@
:: ::
+$ state-0 [%0 base-state-0] +$ state-0 [%0 base-state-0]
+$ state-1 [%1 base-state-0] +$ state-1 [%1 base-state-0]
+$ state-2 [%2 base-state-0]
+$ versioned-state +$ versioned-state
$% state-0 $% state-0
state-1 state-1
state-2
== ==
+$ card card:agent:gall +$ card card:agent:gall
+$ nodes (map index:store node:store) +$ nodes (map index:store node:store)
++ orm orm:store ++ orm orm:store
-- --
:: ::
=| state-1 =| state-2
=* state - =* state -
%- agent:dbug %- agent:dbug
^- agent:gall ^- agent:gall
@ -90,12 +92,23 @@
:: ::
++ on-save !>(state) ++ on-save !>(state)
++ on-load ++ on-load
|= =vase |= =old=vase
^- (quip card _this) ^- (quip card _this)
=+ !<(old=versioned-state vase) =+ !<(old=versioned-state old-vase)
?: ?=(%1 -.old) `this(state old) =| cards=(list card)
:_ this(state [%1 +.old]) |-
(poke-self:pass noun+!>(%reinit))^~ ?- -.old
%0
%_($ -.old %1)
%1
%_ $
-.old %2
cards (weld cards (poke-our:pass %goad noun+!>(%force))^~)
==
%2
:_ this(state old)
(weld cards (poke-self:pass noun+!>(%reinit))^~)
==
:: ::
++ on-poke ++ on-poke
|= [=mark =vase] |= [=mark =vase]