chat-hook: identify DMs correctly

This commit is contained in:
Liam Fitzgerald 2020-07-28 17:04:41 +10:00
parent 4d288f2e4e
commit f381b53e06

View File

@ -20,8 +20,10 @@
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]
@ -50,7 +52,7 @@
$% [%chat-update update:store]
==
--
=| state-5
=| state-6
=* state -
::
%- agent:dbug
@ -79,14 +81,14 @@
=/ 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
@ -397,9 +399,7 @@
|= [=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
~
@ -407,6 +407,8 @@
:: 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]