mezon-js 2.8.10 → 2.8.12
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +4 -0
- package/dist/api.gen.d.ts +2 -0
- package/dist/mezon-js.cjs.js +2 -2
- package/dist/mezon-js.esm.mjs +2 -2
- package/dist/socket.d.ts +6 -2
- package/package.json +1 -1
- package/socket.ts +10 -4
package/api.gen.ts
CHANGED
package/dist/api.gen.d.ts
CHANGED
package/dist/mezon-js.cjs.js
CHANGED
@@ -5081,9 +5081,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
5081
5081
|
unfollowUsers(user_ids) {
|
5082
5082
|
return this.send({ status_unfollow: { user_ids } });
|
5083
5083
|
}
|
5084
|
-
updateChatMessage(clan_id, channel_id, mode, message_id, content) {
|
5084
|
+
updateChatMessage(clan_id, channel_id, mode, message_id, content, mentions) {
|
5085
5085
|
return __async(this, null, function* () {
|
5086
|
-
const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mode } });
|
5086
|
+
const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mentions, mode } });
|
5087
5087
|
return response.channel_message_ack;
|
5088
5088
|
});
|
5089
5089
|
}
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -5052,9 +5052,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
5052
5052
|
unfollowUsers(user_ids) {
|
5053
5053
|
return this.send({ status_unfollow: { user_ids } });
|
5054
5054
|
}
|
5055
|
-
updateChatMessage(clan_id, channel_id, mode, message_id, content) {
|
5055
|
+
updateChatMessage(clan_id, channel_id, mode, message_id, content, mentions) {
|
5056
5056
|
return __async(this, null, function* () {
|
5057
|
-
const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mode } });
|
5057
|
+
const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mentions, mode } });
|
5058
5058
|
return response.channel_message_ack;
|
5059
5059
|
});
|
5060
5060
|
}
|
package/dist/socket.d.ts
CHANGED
@@ -146,6 +146,8 @@ export interface MessageMentionEvent {
|
|
146
146
|
sender_id: string;
|
147
147
|
user_id: string;
|
148
148
|
username: string;
|
149
|
+
s?: number;
|
150
|
+
e?: number;
|
149
151
|
}
|
150
152
|
/** User is react to message */
|
151
153
|
export interface MessageAttachmentEvent {
|
@@ -266,6 +268,8 @@ interface ChannelMessageUpdate {
|
|
266
268
|
message_id: string;
|
267
269
|
/** The content payload. */
|
268
270
|
content: any;
|
271
|
+
/** mentions */
|
272
|
+
mentions?: Array<MessageMentionEvent>;
|
269
273
|
/** The mode payload. */
|
270
274
|
mode: number;
|
271
275
|
};
|
@@ -460,7 +464,7 @@ export interface Socket {
|
|
460
464
|
/** Unfollow one or more users from their status updates. */
|
461
465
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
462
466
|
/** Update a chat message on a chat channel in the server. */
|
463
|
-
updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id: string, content: any): Promise<ChannelMessageAck>;
|
467
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id: string, content: any, mentions?: Array<ApiMessageMention>): Promise<ChannelMessageAck>;
|
464
468
|
/** Update the status for the current user online. */
|
465
469
|
updateStatus(status?: string): Promise<void>;
|
466
470
|
/** Send a chat message to a chat channel on the server. */
|
@@ -594,7 +598,7 @@ export declare class DefaultSocket implements Socket {
|
|
594
598
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
595
599
|
sendPartyData(party_id: string, op_code: number, data: string | Uint8Array): Promise<void>;
|
596
600
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
597
|
-
updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id: string, content: any): Promise<ChannelMessageAck>;
|
601
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id: string, content: any, mentions?: Array<ApiMessageMention>): Promise<ChannelMessageAck>;
|
598
602
|
updateStatus(status?: string): Promise<void>;
|
599
603
|
writeChatMessage(clan_id: string, channel_id: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, notifi_content?: any): Promise<ChannelMessageAck>;
|
600
604
|
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<MessageReactionEvent>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -197,6 +197,10 @@ export interface MessageMentionEvent {
|
|
197
197
|
user_id: string;
|
198
198
|
// mention username
|
199
199
|
username: string;
|
200
|
+
// start position
|
201
|
+
s?: number;
|
202
|
+
// end position
|
203
|
+
e?: number;
|
200
204
|
}
|
201
205
|
|
202
206
|
/** User is react to message */
|
@@ -375,6 +379,8 @@ interface ChannelMessageUpdate {
|
|
375
379
|
message_id: string,
|
376
380
|
/** The content payload. */
|
377
381
|
content: any,
|
382
|
+
/** mentions */
|
383
|
+
mentions?: Array<MessageMentionEvent>;
|
378
384
|
/** The mode payload. */
|
379
385
|
mode: number;
|
380
386
|
};
|
@@ -650,7 +656,7 @@ export interface Socket {
|
|
650
656
|
unfollowUsers(user_ids : string[]) : Promise<void>;
|
651
657
|
|
652
658
|
/** Update a chat message on a chat channel in the server. */
|
653
|
-
updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id : string, content: any) : Promise<ChannelMessageAck>;
|
659
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id : string, content: any, mentions?: Array<ApiMessageMention>) : Promise<ChannelMessageAck>;
|
654
660
|
|
655
661
|
/** Update the status for the current user online. */
|
656
662
|
updateStatus(status? : string) : Promise<void>;
|
@@ -1237,8 +1243,8 @@ export class DefaultSocket implements Socket {
|
|
1237
1243
|
return this.send({status_unfollow: {user_ids: user_ids}});
|
1238
1244
|
}
|
1239
1245
|
|
1240
|
-
async updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id : string, content: any): Promise<ChannelMessageAck> {
|
1241
|
-
const response = await this.send({channel_message_update: {clan_id: clan_id, channel_id: channel_id, message_id: message_id, content: content, mode: mode}});
|
1246
|
+
async updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id : string, content: any, mentions?: Array<ApiMessageMention>): Promise<ChannelMessageAck> {
|
1247
|
+
const response = await this.send({channel_message_update: {clan_id: clan_id, channel_id: channel_id, message_id: message_id, content: content, mentions: mentions, mode: mode}});
|
1242
1248
|
return response.channel_message_ack;
|
1243
1249
|
}
|
1244
1250
|
|
@@ -1247,7 +1253,7 @@ export class DefaultSocket implements Socket {
|
|
1247
1253
|
}
|
1248
1254
|
|
1249
1255
|
async writeChatMessage(clan_id: string, channel_id: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:Boolean, notifi_content?: any ): Promise<ChannelMessageAck> {
|
1250
|
-
const response = await this.send({channel_message_send: {clan_id: clan_id, channel_id: channel_id, mode:mode, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message, mention_everyone:mention_everyone, notifi_content:notifi_content}});
|
1256
|
+
const response = await this.send({channel_message_send: {clan_id: clan_id, channel_id: channel_id, mode: mode, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message, mention_everyone:mention_everyone, notifi_content:notifi_content}});
|
1251
1257
|
return response.channel_message_ack;
|
1252
1258
|
}
|
1253
1259
|
|