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