Skip to content

Commit 5ae5b79

Browse files
committed
v4.4.0
1 parent 2d17fa7 commit 5ae5b79

15 files changed

+38
-39
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11

22
# Changelog
3+
## v4.4.0 (Feb 24, 2023)
4+
### **Features**
5+
### **Disconnect Websocket only**
6+
7+
When you call `sb.disconnect`, it disconnects the WebSocket and clears local cache. You can think of it as logging out.
8+
9+
In some cases, you need to only disconnect the WebSocket. You can now do it by calling `sb.disconnectWebSocket`.
10+
It only disconnects the WebSocket and preserves the local cache.
11+
```
12+
sb.disconnectWebSocket();
13+
```
14+
To connect again after disconnecting with disconnectWebSocket(),
15+
use [sb.connect()](https://sendbird.com/docs/chat/v4/javascript/application/authenticating-a-user/authentication#2-connect-to-the-sendbird-server-with-a-user-id).
16+
```
17+
const user = await sb.connect(userId: userId);
18+
```
19+
### **Added appStateToggleEnabled param**
20+
Added SendbirdChatParams.appStateToggleEnabled which can be used to optionally disable internal control of Websocket connection on document.visibilityState change
21+
22+
23+
### **Improvements**
24+
- Fixed a bug where changed `groupChannel.members` was not updated while disconnected
325

426
## v4.3.1 (Feb 15, 2023)
527
### **Improvements**

__bundle-2fe65dc2.js

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

__bundle-c20e72f4.js renamed to __bundle-477fc3b7.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__bundle-7175498d.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

__bundle-82219c3d.js

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

__bundle-c01340eb.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

__bundle-d8d501e8.js renamed to __bundle-fa5be895.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

groupChannel.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/__definition.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ export declare enum GroupChannelEventSource {
497497
EVENT_PINNED_MESSAGE_UPDATED = 'EVENT_PINNED_MESSAGE_UPDATED',
498498
REQUEST_CHANNEL = 'REQUEST_CHANNEL',
499499
REQUEST_CHANNEL_CHANGELOGS = 'REQUEST_CHANNEL_CHANGELOGS',
500+
REFRESH_CHANNEL = 'REFRESH_CHANNEL',
500501
SYNC_CHANNEL_BACKGROUND = 'SYNC_CHANNEL_BACKGROUND',
501502
SYNC_CHANNEL_CHANGELOGS = 'SYNC_CHANNEL_CHANGELOGS',
502503
}
@@ -1254,6 +1255,7 @@ export declare class SendbirdChat {
12541255
connect(userId: string, authToken?: string): Promise<User>;
12551256
reconnect(): boolean;
12561257
disconnect(): Promise<void>;
1258+
disconnectWebSocket(): Promise<void>;
12571259
setBackgroundState(): void;
12581260
setForegroundState(): void;
12591261
setSessionHandler(handler: SessionHandler): void;
@@ -1353,6 +1355,7 @@ export declare interface SendbirdChatParams<Modules extends Module[]> {
13531355
localCacheEnabled?: boolean;
13541356
localCacheEncryption?: Encryption;
13551357
useAsyncStorageStore?: typeof AsyncStorage;
1358+
appStateToggleEnabled?: boolean;
13561359
}
13571360

13581361
export declare class SendbirdError extends Error {

message.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openChannel.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "4.3.1",
2+
"version": "4.4.0",
33
"description": "Sendbird SDK for JavaScript",
44
"name": "@sendbird/chat",
55
"author": "Sendbird <[email protected]>",

poll.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sendbird.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sendbird.min.js

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

0 commit comments

Comments
 (0)