chat-hook: identify DMs correctly
state-3
state-4
state-5
+ state-6
==
::
++$ state-6 [%6 state-base]
+$ state-5 [%5 state-base]
+$ state-4 [%4 state-base]
+$ state-3 [%3 state-base]
$% [%chat-update update:store]
==
--
-=| state-5
+=| state-6
=* state -
::
%- agent:dbug
=/ old !<(versioned-state old-vase)
=| cards=(list card)
|-
- ?: ?=(%5 -.old)
+ ?: ?=(%6 -.old)
[cards this(state old)]
- ?: ?=(?(%3 %4) -.old)
+ ?: ?=(?(%3 %4 %5) -.old)
=. cards
%+ weld cards
^- (list card)
[%pass /pokeme %agent [our.bol %chat-hook] %poke %noun !>(%fix-dm)]~
- $(-.old %5)
+ $(-.old %6)
?: ?=(%2 -.old)
=. cards
%+ weld cards
|= [=path host=ship]
^- (list card)
?> ?=([@ @ *] path)
- ?. =('~' i.path)
- ~
- =/ =ship (slav %p i.t.path)
+ =/ =ship (slav %p i.path)
?: =(ship our.bol)
:: local dm, no need to do cleanup
~
:: correctly initialized, no need to do cleanup
::
~
+ ?. =((end 3 4 i.t.path) 'dm--')
+ ~
:- =- [%pass /fixdm %agent [our.bol %chat-view] %poke %chat-view-action -]
!> ^- action:view
[%delete path]
