easemob-websdk 4.9.1 → 4.10.0-beta.1

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 CHANGED
@@ -1,19 +1,37 @@
1
1
  # Changes to easemob chat
2
2
 
3
+ ## 4.10.0 (Oct 10, 2024)
4
+
5
+ ### 新增特性
6
+
7
+ 1. 聊天室修改公告时回调中增加公告内容, updateAnnouncement 事件中增加 announcement 字段,表示更新的公告
8
+ 2. 增加错误码 :
9
+ WEBIM_USER_ALREADY_LOGIN 208 用户已登录
10
+ MESSAGE_SEND_TIMEOUT 512 发送消息超时
11
+ 3. 增加 onShow 方法, 小程序或 uniapp 在 onShow 生命周期里执行这个方法, 可以优化重连速度
12
+
13
+ ### 优化
14
+
15
+ 登录方法优化, 调整 open 方法执行 open().then 时机, 调整为在连接鉴权成功之后触发, 在 open().then 中就可以发送消息, 不用再等 onConnected 事件, 同时鉴权失败等登录的错误会在 open.catch 中抛出
16
+
17
+ # 4.9.2 (Sep 19, 2024)
18
+
19
+ - feat: `removeHistoryMessages` support chatRoom.
20
+
3
21
  # 4.9.1 (Sep 5, 2024)
4
22
 
5
- - feat: support uni-push plugin.
6
- - chore: fix type errors and debug logs.
23
+ - feat: support uni-push plugin.
24
+ - chore: fix type errors and debug logs.
7
25
 
8
26
  # 4.9.0 (August 29, 2024)
9
27
 
10
- - Add `onOfflineMessageSyncStart` and `onOfflineMessageSyncFinish` event.
11
- - Add multi device events `setSilentModeForConversation` and `removeSilentModeForConversation`.
12
- - Fix `ChatroomEvent` and `GroupEvent` missed `reason` field.
13
- - PIN message support single chat.
14
- - Add callback error when get DNS failed
15
- - Remove redundant judgment at reconnecting.
16
- - chore: fix type errors and debug logs
28
+ - Add `onOfflineMessageSyncStart` and `onOfflineMessageSyncFinish` event.
29
+ - Add multi device events `setSilentModeForConversation` and `removeSilentModeForConversation`.
30
+ - Fix `ChatroomEvent` and `GroupEvent` missed `reason` field.
31
+ - PIN message support single chat.
32
+ - Add callback error when get DNS failed
33
+ - Remove redundant judgment at reconnecting.
34
+ - chore: fix type errors and debug logs
17
35
 
18
36
  # 4.8.1 (Jul 15, 2024)
19
37
 
package/Easemob-chat.d.ts CHANGED
@@ -4413,14 +4413,15 @@ export declare namespace EasemobChat {
4413
4413
  removeHistoryMessages(
4414
4414
  this: Connection,
4415
4415
  options: {
4416
- /** The ID of the peer user or group. */
4416
+ /** The ID of the peer user , group ID or chatRoom ID. */
4417
4417
  targetId: string;
4418
4418
  /**
4419
- * conversation type:
4420
- * - `singleChat`: single chat;
4419
+ * The conversation type:
4420
+ * - `singleChat`: one-to-one chat;
4421
4421
  * - `groupChat`: group chat.
4422
+ * - `chatRoom`: chat room.
4422
4423
  */
4423
- chatType: 'singleChat' | 'groupChat';
4424
+ chatType: ChatType;
4424
4425
  /** The ID list of messages to be deleted. A maximum of 20 message IDs can be passed in. */
4425
4426
  messageIds?: Array<string>;
4426
4427
  /** The starting timestamp for message deletion. Messages with the timestamp before the specified one will be deleted. */
@@ -5633,6 +5634,9 @@ export declare namespace EasemobChat {
5633
5634
  pageSize: number;
5634
5635
  }
5635
5636
  ): Promise<AsyncResult<JoinedChatRoomsResult>>;
5637
+
5638
+ /** Execute this method during the onShow declaration cycle of the application, which will actively detect whether the current connection is valid. */
5639
+ onShow(): void;
5636
5640
  }
5637
5641
 
5638
5642
  // ----- for EventHandler ------