Skip to content

Commit decaa20

Browse files
committed
Update to ably-js 2.20.0 in examples and use subscription fields
Resolves AIT-553
1 parent e8d88da commit decaa20

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

examples/liveobjects-live-map/javascript/src/script.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ async function initTasks(tasks: PathObject<LiveMap<Tasks>>) {
4040

4141
// Handle individual task updates
4242
const { operation } = message;
43-
if (operation.action === 'map.set' && operation.mapOp?.key) {
44-
tasksOnUpdated(operation.mapOp.key, tasks);
45-
} else if (operation.action === 'map.remove' && operation.mapOp?.key) {
46-
tasksOnRemoved(operation.mapOp.key);
43+
if (operation.action === 'map.set' && operation.mapSet) {
44+
tasksOnUpdated(operation.mapSet.key, tasks);
45+
} else if (operation.action === 'map.remove' && operation.mapRemove) {
46+
tasksOnRemoved(operation.mapRemove.key);
4747
}
4848
});
4949

examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"@ably/chat": "~1.1.0",
114114
"@ably/chat-react-ui-kit": "~0.3.0",
115115
"@ably/spaces": "~0.4.0",
116-
"ably": "~2.17.0",
116+
"ably": "~2.20.0",
117117
"cors": "^2.8.5",
118118
"franken-ui": "^2.0.0",
119119
"lodash": "^4.17.23",

examples/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,10 +915,10 @@
915915
magic-string "^0.27.0"
916916
react-refresh "^0.14.0"
917917

918-
ably@~2.17.0:
919-
version "2.17.0"
920-
resolved "https://registry.yarnpkg.com/ably/-/ably-2.17.0.tgz#3d30547aebd3a70573277112d7f464e354f1e252"
921-
integrity sha512-BJPxdFU2uuT4UDRUBcmLXRPNmXWGPIKZ+B7hMj1ygja3UZA2zox388yul1h1ie07V/8+Kn8fzPik3ewiSl5tAA==
918+
ably@~2.20.0:
919+
version "2.20.0"
920+
resolved "https://registry.yarnpkg.com/ably/-/ably-2.20.0.tgz#f2b054f3b71864c16867b6a51f032443f6576b9a"
921+
integrity sha512-jTNUKKTnnG0A+DpK96+AU56nIrt2xXdliidNOl2ShQSHYXqXAvnK+q9V6lJj88ek0ZMvm23ZzV9inuzmkV16vQ==
922922
dependencies:
923923
"@ably/msgpack-js" "^0.4.0"
924924
dequal "^2.0.3"

0 commit comments

Comments
 (0)