easemob-websdk 4.3.0 → 4.3.1-beta
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 +8 -0
- package/Easemob-chat.d.ts +38 -7
- package/Easemob-chat.js +1 -1
- package/chatroom/chatroom.js +1 -1
- package/group/group.js +1 -1
- package/message/audio.d.ts +2 -0
- package/message/cmd.d.ts +2 -0
- package/message/combine.d.ts +3 -0
- package/message/custom.d.ts +2 -0
- package/message/file.d.ts +2 -0
- package/message/img.d.ts +2 -0
- package/message/location.d.ts +2 -0
- package/message/text.d.ts +2 -0
- package/message/video.d.ts +2 -0
- package/miniCore/miniCore.d.ts +14 -2
- package/miniCore/miniCore.js +1 -1
- package/miniProgram/Easemob-chat.js +1 -1
- package/package.json +1 -1
- package/types/engineCore.d.ts +3 -0
- package/types/indexApi.d.ts +8 -1
- package/types/message.d.ts +15 -0
- package/uniApp/Easemob-chat.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changes to easemob chat
|
|
2
2
|
|
|
3
|
+
# 4.3.1 (Dec 13, 2023)
|
|
4
|
+
|
|
5
|
+
- Adds use replaced message contents
|
|
6
|
+
- Adds MiniCore SDK logger
|
|
7
|
+
- Verify that the `open` parameter user is not defined
|
|
8
|
+
- Types `SendMsgResult` add a message field
|
|
9
|
+
- Fixed the socket not closing when the network is offline on some device
|
|
10
|
+
|
|
3
11
|
# 4.3.0 (Nov 13, 2023)
|
|
4
12
|
|
|
5
13
|
- Adds contact API
|
package/Easemob-chat.d.ts
CHANGED
|
@@ -57,11 +57,18 @@ export declare namespace EasemobChat {
|
|
|
57
57
|
jid: Jid;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
type ExcludeAckMessageBody = Exclude<
|
|
61
|
+
MessageBody,
|
|
62
|
+
ReadMsgBody | DeliveryMsgBody | ChannelMsgBody
|
|
63
|
+
>;
|
|
64
|
+
|
|
60
65
|
interface SendMsgResult {
|
|
61
66
|
/** The message local ID. */
|
|
62
67
|
localMsgId: string;
|
|
63
68
|
/** The ID of the message on the server. */
|
|
64
69
|
serverMsgId: string;
|
|
70
|
+
/** Message. */
|
|
71
|
+
message?: ExcludeAckMessageBody;
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
/** The modified message. */
|
|
@@ -214,6 +221,8 @@ export declare namespace EasemobChat {
|
|
|
214
221
|
deviceId?: string;
|
|
215
222
|
/** Whether to use your own upload function, for example, when uploading images and files to your server. - `true`: Use your own upload function; - (Default)`false`: Do not use your own upload function. */
|
|
216
223
|
useOwnUploadFun?: boolean;
|
|
224
|
+
/** When the moderation service replaces the content of a message, whether the adjusted message is returned to the sender. - `true`: Return the adjusted message to the sender. - `false`: Return the original message to the sender. */
|
|
225
|
+
useReplacedMessageContents?: boolean;
|
|
217
226
|
/** The maximum number of reconnection. */
|
|
218
227
|
autoReconnectNumMax?: number;
|
|
219
228
|
/** Whether DNS is enabled or not. It is enabled by default. The private cloud should be turned off */
|
|
@@ -790,13 +799,6 @@ export declare namespace EasemobChat {
|
|
|
790
799
|
result: 'ok';
|
|
791
800
|
}
|
|
792
801
|
|
|
793
|
-
interface SendMsgResult {
|
|
794
|
-
/** The local ID of the message. */
|
|
795
|
-
localMsgId: string;
|
|
796
|
-
/** The message ID on the server. */
|
|
797
|
-
serverMsgId: string;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
802
|
interface HistoryMessages {
|
|
801
803
|
/** The starting message ID for the next query. If the number of messages returned by the SDK is smaller than the requested number, the cursor will be `undefined`. */
|
|
802
804
|
cursor?: string;
|
|
@@ -1210,6 +1212,15 @@ export declare namespace EasemobChat {
|
|
|
1210
1212
|
secret: string;
|
|
1211
1213
|
}
|
|
1212
1214
|
|
|
1215
|
+
interface NewTokenResult {
|
|
1216
|
+
/** Whether success. */
|
|
1217
|
+
status: boolean;
|
|
1218
|
+
/** The new token. */
|
|
1219
|
+
token?: string;
|
|
1220
|
+
/** The expire time. */
|
|
1221
|
+
expire?: number;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1213
1224
|
/**
|
|
1214
1225
|
* The error code defined by SDK.
|
|
1215
1226
|
* @module Code
|
|
@@ -1486,6 +1497,8 @@ export declare namespace EasemobChat {
|
|
|
1486
1497
|
private reconnect(): void;
|
|
1487
1498
|
/** send message */
|
|
1488
1499
|
send(params: MessageBody): Promise<SendMsgResult>;
|
|
1500
|
+
/** Updates token. */
|
|
1501
|
+
renewToken(token: string): Promise<NewTokenResult>;
|
|
1489
1502
|
|
|
1490
1503
|
// ChatRoom API
|
|
1491
1504
|
/**
|
|
@@ -6092,6 +6105,8 @@ export declare namespace EasemobChat {
|
|
|
6092
6105
|
priority?: MessagePriority;
|
|
6093
6106
|
/** Whether global notify message or not. */
|
|
6094
6107
|
broadcast?: boolean;
|
|
6108
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
6109
|
+
isContentReplaced?: boolean;
|
|
6095
6110
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6096
6111
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6097
6112
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
@@ -6157,6 +6172,8 @@ export declare namespace EasemobChat {
|
|
|
6157
6172
|
priority?: MessagePriority;
|
|
6158
6173
|
/** Whether global notify message or not. */
|
|
6159
6174
|
broadcast?: boolean;
|
|
6175
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
6176
|
+
isContentReplaced?: boolean;
|
|
6160
6177
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6161
6178
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6162
6179
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
@@ -6303,6 +6320,8 @@ export declare namespace EasemobChat {
|
|
|
6303
6320
|
priority?: MessagePriority;
|
|
6304
6321
|
/** Whether global notify message or not. */
|
|
6305
6322
|
broadcast?: boolean;
|
|
6323
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
6324
|
+
isContentReplaced?: boolean;
|
|
6306
6325
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6307
6326
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6308
6327
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
@@ -6413,6 +6432,8 @@ export declare namespace EasemobChat {
|
|
|
6413
6432
|
priority?: MessagePriority;
|
|
6414
6433
|
/** Whether global notify message or not. */
|
|
6415
6434
|
broadcast?: boolean;
|
|
6435
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
6436
|
+
isContentReplaced?: boolean;
|
|
6416
6437
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6417
6438
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6418
6439
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
@@ -6531,6 +6552,8 @@ export declare namespace EasemobChat {
|
|
|
6531
6552
|
priority?: MessagePriority;
|
|
6532
6553
|
/** Whether global notify message or not. */
|
|
6533
6554
|
broadcast?: boolean;
|
|
6555
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
6556
|
+
isContentReplaced?: boolean;
|
|
6534
6557
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6535
6558
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6536
6559
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
@@ -6675,6 +6698,8 @@ export declare namespace EasemobChat {
|
|
|
6675
6698
|
priority?: MessagePriority;
|
|
6676
6699
|
/** Whether global notify message or not. */
|
|
6677
6700
|
broadcast?: boolean;
|
|
6701
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
6702
|
+
isContentReplaced?: boolean;
|
|
6678
6703
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6679
6704
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6680
6705
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
@@ -6813,6 +6838,8 @@ export declare namespace EasemobChat {
|
|
|
6813
6838
|
priority?: MessagePriority;
|
|
6814
6839
|
/** Whether global notify message or not. */
|
|
6815
6840
|
broadcast?: boolean;
|
|
6841
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
6842
|
+
isContentReplaced?: boolean;
|
|
6816
6843
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6817
6844
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6818
6845
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
@@ -6964,6 +6991,8 @@ export declare namespace EasemobChat {
|
|
|
6964
6991
|
priority?: MessagePriority;
|
|
6965
6992
|
/** Whether global notify message or not. */
|
|
6966
6993
|
broadcast?: boolean;
|
|
6994
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
6995
|
+
isContentReplaced?: boolean;
|
|
6967
6996
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6968
6997
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6969
6998
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
@@ -7107,6 +7136,8 @@ export declare namespace EasemobChat {
|
|
|
7107
7136
|
priority?: MessagePriority;
|
|
7108
7137
|
/** Whether global notify message or not. */
|
|
7109
7138
|
broadcast?: boolean;
|
|
7139
|
+
/** Whether the message content is replaced. This property is valid only when `useReplacedMessageContent` is set to `true` during initialization. */
|
|
7140
|
+
isContentReplaced?: boolean;
|
|
7110
7141
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
7111
7142
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
7112
7143
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|