mezon-js 2.8.23 → 2.8.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.23",
3
+ "version": "2.8.24",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -381,6 +381,8 @@ interface ChannelMessageUpdate {
381
381
  content: any,
382
382
  /** mentions */
383
383
  mentions?: Array<MessageMentionEvent>;
384
+ /** attachments */
385
+ attachments?: Array<MessageAttachmentEvent>;
384
386
  /** The mode payload. */
385
387
  mode: number;
386
388
  };
@@ -706,7 +708,7 @@ export interface Socket {
706
708
  unfollowUsers(user_ids : string[]) : Promise<void>;
707
709
 
708
710
  /** Update a chat message on a chat channel in the server. */
709
- updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id : string, content: any, mentions?: Array<ApiMessageMention>) : Promise<ChannelMessageAck>;
711
+ updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id : string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>) : Promise<ChannelMessageAck>;
710
712
 
711
713
  /** Update the status for the current user online. */
712
714
  updateStatus(status? : string) : Promise<void>;
@@ -1312,8 +1314,8 @@ export class DefaultSocket implements Socket {
1312
1314
  return this.send({status_unfollow: {user_ids: user_ids}});
1313
1315
  }
1314
1316
 
1315
- async updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id : string, content: any, mentions?: Array<ApiMessageMention>): Promise<ChannelMessageAck> {
1316
- 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}});
1317
+ async updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id : string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>): Promise<ChannelMessageAck> {
1318
+ const response = await this.send({channel_message_update: {clan_id: clan_id, channel_id: channel_id, message_id: message_id, content: content, mentions: mentions, attachments: attachments, mode: mode}});
1317
1319
  return response.channel_message_ack;
1318
1320
  }
1319
1321