mezon-js 2.12.54 → 2.12.56
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/dist/mezon-js.cjs.js +6 -4
- package/dist/mezon-js.esm.mjs +6 -4
- package/dist/socket.d.ts +4 -2
- package/package.json +1 -1
- package/session.ts +2 -2
- package/socket.ts +11 -1
package/dist/mezon-js.cjs.js
CHANGED
@@ -6846,10 +6846,10 @@ var Session = class _Session {
|
|
6846
6846
|
this.update(token, refresh_token, is_remember);
|
6847
6847
|
}
|
6848
6848
|
isexpired(currenttime) {
|
6849
|
-
return this.expires_at - currenttime
|
6849
|
+
return this.expires_at - currenttime <= 0;
|
6850
6850
|
}
|
6851
6851
|
isrefreshexpired(currenttime) {
|
6852
|
-
return this.refresh_expires_at - currenttime
|
6852
|
+
return this.refresh_expires_at - currenttime <= 0;
|
6853
6853
|
}
|
6854
6854
|
update(token, refreshToken, isRemember) {
|
6855
6855
|
const tokenParts = token.split(".");
|
@@ -7739,7 +7739,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7739
7739
|
}
|
7740
7740
|
});
|
7741
7741
|
}
|
7742
|
-
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id) {
|
7742
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id, mentions, references) {
|
7743
7743
|
return __async(this, null, function* () {
|
7744
7744
|
const response = yield this.send({
|
7745
7745
|
channel_message_remove: {
|
@@ -7749,7 +7749,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7749
7749
|
message_id,
|
7750
7750
|
is_public,
|
7751
7751
|
has_attachment,
|
7752
|
-
topic_id
|
7752
|
+
topic_id,
|
7753
|
+
mentions,
|
7754
|
+
references
|
7753
7755
|
}
|
7754
7756
|
});
|
7755
7757
|
return response.channel_message_ack;
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6812,10 +6812,10 @@ var Session = class _Session {
|
|
6812
6812
|
this.update(token, refresh_token, is_remember);
|
6813
6813
|
}
|
6814
6814
|
isexpired(currenttime) {
|
6815
|
-
return this.expires_at - currenttime
|
6815
|
+
return this.expires_at - currenttime <= 0;
|
6816
6816
|
}
|
6817
6817
|
isrefreshexpired(currenttime) {
|
6818
|
-
return this.refresh_expires_at - currenttime
|
6818
|
+
return this.refresh_expires_at - currenttime <= 0;
|
6819
6819
|
}
|
6820
6820
|
update(token, refreshToken, isRemember) {
|
6821
6821
|
const tokenParts = token.split(".");
|
@@ -7705,7 +7705,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7705
7705
|
}
|
7706
7706
|
});
|
7707
7707
|
}
|
7708
|
-
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id) {
|
7708
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id, mentions, references) {
|
7709
7709
|
return __async(this, null, function* () {
|
7710
7710
|
const response = yield this.send({
|
7711
7711
|
channel_message_remove: {
|
@@ -7715,7 +7715,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7715
7715
|
message_id,
|
7716
7716
|
is_public,
|
7717
7717
|
has_attachment,
|
7718
|
-
topic_id
|
7718
|
+
topic_id,
|
7719
|
+
mentions,
|
7720
|
+
references
|
7719
7721
|
}
|
7720
7722
|
});
|
7721
7723
|
return response.channel_message_ack;
|
package/dist/socket.d.ts
CHANGED
@@ -323,6 +323,8 @@ interface ChannelMessageRemove {
|
|
323
323
|
/** attachments */
|
324
324
|
has_attachment?: boolean;
|
325
325
|
topic_id?: string;
|
326
|
+
mentions: string;
|
327
|
+
references: string;
|
326
328
|
};
|
327
329
|
}
|
328
330
|
/** Presence update for a particular realtime chat channel. */
|
@@ -892,7 +894,7 @@ export interface Socket {
|
|
892
894
|
/** handle user join/leave channel voice on the server. */
|
893
895
|
handleParticipantMeetState(clan_id: string, channel_id: string, display_name: string, state: number): Promise<void>;
|
894
896
|
/** Remove a chat message from a chat channel on the server. */
|
895
|
-
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
|
897
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string, mentions?: string, references?: string): Promise<ChannelMessageAck>;
|
896
898
|
/** Execute an RPC function to the server. */
|
897
899
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
898
900
|
/** Unfollow one or more users from their status updates. */
|
@@ -1113,7 +1115,7 @@ export declare class DefaultSocket implements Socket {
|
|
1113
1115
|
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
1114
1116
|
handleParticipantMeetState(clan_id: string, channel_id: string, display_name: string, state: number): Promise<void>;
|
1115
1117
|
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
1116
|
-
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
|
1118
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string, mentions?: string, references?: string): Promise<ChannelMessageAck>;
|
1117
1119
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
1118
1120
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
1119
1121
|
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean, topic_id?: string, is_update_msg_topic?: boolean): Promise<ChannelMessageAck>;
|
package/package.json
CHANGED
package/session.ts
CHANGED
@@ -72,11 +72,11 @@ export class Session implements ISession {
|
|
72
72
|
}
|
73
73
|
|
74
74
|
isexpired(currenttime: number): boolean {
|
75
|
-
return (this.expires_at! - currenttime)
|
75
|
+
return (this.expires_at! - currenttime) <= 0;
|
76
76
|
}
|
77
77
|
|
78
78
|
isrefreshexpired(currenttime: number): boolean {
|
79
|
-
return (this.refresh_expires_at! - currenttime)
|
79
|
+
return (this.refresh_expires_at! - currenttime) <= 0;
|
80
80
|
}
|
81
81
|
|
82
82
|
update(token: string, refreshToken: string, isRemember: boolean) {
|
package/socket.ts
CHANGED
@@ -500,6 +500,10 @@ interface ChannelMessageRemove {
|
|
500
500
|
has_attachment?: boolean;
|
501
501
|
//
|
502
502
|
topic_id?: string;
|
503
|
+
// mentions
|
504
|
+
mentions: string;
|
505
|
+
// references
|
506
|
+
references: string;
|
503
507
|
};
|
504
508
|
}
|
505
509
|
|
@@ -1382,7 +1386,9 @@ export interface Socket {
|
|
1382
1386
|
is_public: boolean,
|
1383
1387
|
message_id: string,
|
1384
1388
|
has_attachment?: boolean,
|
1385
|
-
topic_id?: string
|
1389
|
+
topic_id?: string,
|
1390
|
+
mentions?:string,
|
1391
|
+
references?: string
|
1386
1392
|
): Promise<ChannelMessageAck>;
|
1387
1393
|
|
1388
1394
|
/** Execute an RPC function to the server. */
|
@@ -2591,6 +2597,8 @@ export class DefaultSocket implements Socket {
|
|
2591
2597
|
message_id: string,
|
2592
2598
|
has_attachment?: boolean,
|
2593
2599
|
topic_id?: string,
|
2600
|
+
mentions?: string,
|
2601
|
+
references?: string
|
2594
2602
|
): Promise<ChannelMessageAck> {
|
2595
2603
|
const response = await this.send({
|
2596
2604
|
channel_message_remove: {
|
@@ -2601,6 +2609,8 @@ export class DefaultSocket implements Socket {
|
|
2601
2609
|
is_public: is_public,
|
2602
2610
|
has_attachment: has_attachment,
|
2603
2611
|
topic_id: topic_id,
|
2612
|
+
mentions: mentions,
|
2613
|
+
references: references
|
2604
2614
|
},
|
2605
2615
|
});
|
2606
2616
|
|