easemob-websdk 4.11.0 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/Easemob-chat.d.ts +26 -19
- package/Easemob-chat.js +1 -1
- package/chatroom/chatroom.js +1 -1
- package/contact/contact.js +1 -1
- package/group/group.js +1 -1
- package/localCache/localCache.js +1 -1
- package/message/index.d.ts +5 -5
- package/miniCore/miniCore.d.ts +13 -4
- package/miniCore/miniCore.js +1 -1
- package/miniProgram/Easemob-chat.js +1 -1
- package/package.json +10 -10
- package/presence/presence.js +1 -1
- package/silent/silent.js +1 -1
- package/thread/thread.js +1 -1
- package/translation/translation.js +1 -1
- package/types/chatRoomApi.d.ts +20 -0
- package/uniApp/Easemob-chat.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changes to easemob chat
|
|
2
2
|
|
|
3
|
+
## 4.12.0 (Jan 9, 2025)
|
|
4
|
+
|
|
5
|
+
### 新增特性
|
|
6
|
+
|
|
7
|
+
1. `onModifiedMessage` 事件回调中增加 ext 字段。
|
|
8
|
+
2. 加入聊天室 `joinChatRoom` 成功回调新增当前聊天室信息。
|
|
9
|
+
|
|
10
|
+
### 修复
|
|
11
|
+
|
|
12
|
+
1. 格式化小程序SDK API 请求失败错误码, 和Web端统一。
|
|
13
|
+
2. 修复uniapp sdk 在4.36版本运行到鸿蒙平台,无限重连的问题。
|
|
14
|
+
3. 修复偶现无法拉取消息的问题。
|
|
15
|
+
|
|
16
|
+
### 优化
|
|
17
|
+
|
|
18
|
+
1. 优化重连时间间隔
|
|
19
|
+
2. 小程序SDK支持httpDNS, 默认开启
|
|
20
|
+
|
|
21
|
+
|
|
3
22
|
## 4.11.0 (Nov 29, 2024)
|
|
4
23
|
|
|
5
24
|
### 新增特性
|
package/Easemob-chat.d.ts
CHANGED
|
@@ -26,19 +26,6 @@ export declare namespace EasemobChat {
|
|
|
26
26
|
/** The group ID. */
|
|
27
27
|
type GroupId = string;
|
|
28
28
|
|
|
29
|
-
interface CommonRequestResult {
|
|
30
|
-
/** The result of request. */
|
|
31
|
-
result: boolean;
|
|
32
|
-
/** Action. */
|
|
33
|
-
action: string;
|
|
34
|
-
/** The reason of failure. */
|
|
35
|
-
reason?: string;
|
|
36
|
-
/** The user ID. */
|
|
37
|
-
user: string;
|
|
38
|
-
/** The group/chat room ID. */
|
|
39
|
-
id: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
29
|
interface Jid {
|
|
43
30
|
appKey: string;
|
|
44
31
|
clientResource: string;
|
|
@@ -256,9 +243,11 @@ export declare namespace EasemobChat {
|
|
|
256
243
|
| GroupMemberAttributesUpdateMultiDeviceInfo
|
|
257
244
|
| NotificationMultiDeviceInfo;
|
|
258
245
|
|
|
259
|
-
|
|
260
|
-
/** The unique application key registered
|
|
261
|
-
appKey
|
|
246
|
+
type ConnectionParameters = {
|
|
247
|
+
/** The unique application key registered on the console. */
|
|
248
|
+
appKey?: string;
|
|
249
|
+
/** The unique application id registered on the console. */
|
|
250
|
+
appId?: string;
|
|
262
251
|
/** Whether to enable the delivery receipt function. - `true`: Enable; - (Default)`false`: Do not enable. */
|
|
263
252
|
delivery?: boolean;
|
|
264
253
|
/** Heartbeat interval, in milliseconds. */
|
|
@@ -285,7 +274,7 @@ export declare namespace EasemobChat {
|
|
|
285
274
|
* <br> This parameter has an impact on the kicking policy during a multi-device login scenario.
|
|
286
275
|
*/
|
|
287
276
|
isFixedDeviceId?: boolean;
|
|
288
|
-
}
|
|
277
|
+
};
|
|
289
278
|
|
|
290
279
|
interface RegisterUserResult extends AsyncResult {
|
|
291
280
|
entities: BaseUserInfo[];
|
|
@@ -366,6 +355,24 @@ export declare namespace EasemobChat {
|
|
|
366
355
|
id: string;
|
|
367
356
|
}
|
|
368
357
|
|
|
358
|
+
interface JoinChatRoomInfo {
|
|
359
|
+
/** Whether all members are muted. */
|
|
360
|
+
isAllMembersMuted: boolean;
|
|
361
|
+
/** Chatroom creation time. */
|
|
362
|
+
createTimestamp: number;
|
|
363
|
+
/** Whether the member is on the allowlist. */
|
|
364
|
+
isInAllowlist: boolean;
|
|
365
|
+
/** The current number of members in the chat room. */
|
|
366
|
+
memberCount: number;
|
|
367
|
+
/** The member mute expiration time. if the member is not muted, the value is -1. */
|
|
368
|
+
muteExpireTimestamp: number;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
type JoinChatRoomResult = CommonRequestResult & {
|
|
372
|
+
/** The information returned after joining a chat room. */
|
|
373
|
+
info: JoinChatRoomInfo;
|
|
374
|
+
};
|
|
375
|
+
|
|
369
376
|
interface AddUsersToChatRoomResult {
|
|
370
377
|
/** The newly added members. */
|
|
371
378
|
newmembers: string[];
|
|
@@ -1837,10 +1844,10 @@ export declare namespace EasemobChat {
|
|
|
1837
1844
|
* - (Default) `false`: The user joins the chat room, without leaving all other chat rooms.
|
|
1838
1845
|
*/
|
|
1839
1846
|
leaveOtherRooms?: boolean;
|
|
1840
|
-
success?: (res: AsyncResult<
|
|
1847
|
+
success?: (res: AsyncResult<JoinChatRoomResult>) => void;
|
|
1841
1848
|
error?: (error: ErrorEvent) => void;
|
|
1842
1849
|
}
|
|
1843
|
-
): Promise<AsyncResult<
|
|
1850
|
+
): Promise<AsyncResult<JoinChatRoomResult>>;
|
|
1844
1851
|
|
|
1845
1852
|
/**
|
|
1846
1853
|
* @deprecated Use {@link leaveChatRoom} instead.
|