Skip to content

Commit 08509ac

Browse files
committed
Upgrade @ably/chat to v1.3.1 and remove useBinaryProtocol workaround
The new Chat SDK version fixes the MsgPack/binary protocol issue with realtime.request() REST calls, so the getClientOptions override that set useBinaryProtocol=false is no longer needed.
1 parent 3551373 commit 08509ac

4 files changed

Lines changed: 9 additions & 19 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,6 +2038,8 @@ EXAMPLES
20382038
20392039
$ ably channels presence update my-channel --data '{"status":"busy"}' --json
20402040
2041+
$ ably channels presence update my-channel --data '{"status":"busy"}' --pretty-json
2042+
20412043
$ ably channels presence update my-channel --data '{"status":"online"}' --duration 60
20422044
```
20432045

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
}
111111
},
112112
"dependencies": {
113-
"@ably/chat": "^1.0.0",
113+
"@ably/chat": "^1.3.1",
114114
"@ably/spaces": "^0.4.0",
115115
"@inquirer/prompts": "^5.1.3",
116116
"@oclif/core": "^4.2.10",

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/chat-base-command.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type * as Ably from "ably";
21
import { ChatClient, Room, RoomStatus } from "@ably/chat";
32

43
import { AblyBaseCommand } from "./base-command.js";
@@ -17,17 +16,6 @@ export abstract class ChatBaseCommand extends AblyBaseCommand {
1716
private _chatClient: ChatClient | null = null;
1817
private _cleanupTimeout: NodeJS.Timeout | undefined;
1918

20-
/**
21-
* Override getClientOptions to disable binary protocol for Chat commands.
22-
* The Chat API uses realtime.request() for REST calls, and binary (MsgPack)
23-
* encoding is not supported by the Chat API endpoints.
24-
*/
25-
protected override getClientOptions(flags: BaseFlags): Ably.ClientOptions {
26-
const options = super.getClientOptions(flags);
27-
options.useBinaryProtocol = false;
28-
return options;
29-
}
30-
3119
/**
3220
* finally disposes of the chat client, if there is one, which includes cleaning up any subscriptions.
3321
*

0 commit comments

Comments
 (0)