Update chat example code
This commit is contained in:
parent
96a8367667
commit
4cce2fb6f2
|
@ -16,13 +16,13 @@
|
|||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "0.995",
|
||||
"@preserves/core": "0.995.200",
|
||||
"@syndicate-lang/core": "*",
|
||||
"@syndicate-lang/html": "*",
|
||||
"@syndicate-lang/ws-relay": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@preserves/schema-cli": "0.995",
|
||||
"@preserves/schema-cli": "0.995.201",
|
||||
"@syndicate-lang/ts-plugin": "*",
|
||||
"@syndicate-lang/tsc": "*",
|
||||
"rollup": "^2.60",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { fromJS, Bytes, Dataspace, Ref, Sturdy, AnyValue, Reader, Schemas, Embedded, stringify } from "@syndicate-lang/core";
|
||||
import { fromJS, Bytes, Dataspace, Ref, Sturdy, AnyValue, Reader, Schemas, stringify } from "@syndicate-lang/core";
|
||||
import { boot as bootHtml, Anchor, template as html, HtmlFragments, GlobalEvent, UIAttribute, UIChangeableProperty } from "@syndicate-lang/html";
|
||||
import { boot as bootWakeDetector, WakeEvent } from "./wake-detector";
|
||||
import { boot as bootWsRelay } from "@syndicate-lang/ws-relay";
|
||||
|
@ -46,12 +46,9 @@ function bootChat(ds: Ref) {
|
|||
during G.ResolvePath({
|
||||
"route": route,
|
||||
"addr": $addr,
|
||||
"control": $control_e: Embedded,
|
||||
"resolved": G.Resolved.accepted($remoteDs_e: Embedded),
|
||||
"control": $control: Ref,
|
||||
"resolved": G.Resolved.accepted($remoteDs: Ref),
|
||||
}) => {
|
||||
const remoteDs = remoteDs_e.embeddedValue;
|
||||
const control = control_e.embeddedValue;
|
||||
|
||||
on message WakeEvent() => at control {
|
||||
send message G.ForceDisconnect();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue