Merge pull request #3204 from urbit/lf/dm-fix-fix-fix

chat-hook: identify DMs correctly
This commit is contained in:
matildepark 2020-07-28 23:46:14 -04:00 committed by GitHub
commit 1ff3f6b3e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,8 +20,10 @@
state-3 state-3
state-4 state-4
state-5 state-5
state-6
== ==
:: ::
+$ state-6 [%6 state-base]
+$ state-5 [%5 state-base] +$ state-5 [%5 state-base]
+$ state-4 [%4 state-base] +$ state-4 [%4 state-base]
+$ state-3 [%3 state-base] +$ state-3 [%3 state-base]
@ -50,7 +52,7 @@
$% [%chat-update update:store] $% [%chat-update update:store]
== ==
-- --
=| state-5 =| state-6
=* state - =* state -
:: ::
%- agent:dbug %- agent:dbug
@ -79,14 +81,14 @@
=/ old !<(versioned-state old-vase) =/ old !<(versioned-state old-vase)
=| cards=(list card) =| cards=(list card)
|- |-
?: ?=(%5 -.old) ?: ?=(%6 -.old)
[cards this(state old)] [cards this(state old)]
?: ?=(?(%3 %4) -.old) ?: ?=(?(%3 %4 %5) -.old)
=. cards =. cards
%+ weld cards %+ weld cards
^- (list card) ^- (list card)
[%pass /pokeme %agent [our.bol %chat-hook] %poke %noun !>(%fix-dm)]~ [%pass /pokeme %agent [our.bol %chat-hook] %poke %noun !>(%fix-dm)]~
$(-.old %5) $(-.old %6)
?: ?=(%2 -.old) ?: ?=(%2 -.old)
=. cards =. cards
%+ weld cards %+ weld cards
@ -397,9 +399,7 @@
|= [=path host=ship] |= [=path host=ship]
^- (list card) ^- (list card)
?> ?=([@ @ *] path) ?> ?=([@ @ *] path)
?. =('~' i.path) =/ =ship (slav %p i.path)
~
=/ =ship (slav %p i.t.path)
?: =(ship our.bol) ?: =(ship our.bol)
:: local dm, no need to do cleanup :: local dm, no need to do cleanup
~ ~
@ -407,6 +407,8 @@
:: correctly initialized, 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 -] :- =- [%pass /fixdm %agent [our.bol %chat-view] %poke %chat-view-action -]
!> ^- action:view !> ^- action:view
[%delete path] [%delete path]