chat-hook: emit cards upon upgrade AND store cards to be sent later upon chat-store trigger to support either order of updating

This commit is contained in:
Logan Allen 2020-03-09 12:40:04 -07:00
parent 3824402200
commit e8c95157d4
2 changed files with 5 additions and 8 deletions

View File

@ -13,14 +13,12 @@
state-1 state-1
== ==
:: ::
+$ state-1 [%1 new-state] +$ state-1
+$ state-0 [%0 state-base] $: %1
+$ new-state
$: synced=(map path ship)
invite-created=_|
allow-history=(map path ?)
loaded-cards=(list card) loaded-cards=(list card)
state-base
== ==
+$ state-0 [%0 state-base]
+$ state-base +$ state-base
$: synced=(map path ship) $: synced=(map path ship)
invite-created=_| invite-created=_|
@ -79,7 +77,7 @@
^- (list (list card)) ^- (list (list card))
%+ turn ~(tap in keys) generate-cards %+ turn ~(tap in keys) generate-cards
== ==
[~ this(state upgraded-state)] [loaded-cards.upgraded-state this(state upgraded-state)]
:: ::
++ generate-cards ++ generate-cards
|= old-chat=path |= old-chat=path

View File

@ -2,7 +2,6 @@
|% |%
+$ chat-hook-action +$ chat-hook-action
$% :: %add-owned: make a chatroom accessible to foreign ships $% :: %add-owned: make a chatroom accessible to foreign ships
:: specified by the rw-security model
:: ::
[%add-owned =path allow-history=?] [%add-owned =path allow-history=?]
:: %add-synced: mirror a foreign chatroom to our chat-store :: %add-synced: mirror a foreign chatroom to our chat-store