mezon-js 2.8.26 → 2.8.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -5127,9 +5127,9 @@ var _DefaultSocket = class _DefaultSocket {
5127
5127
  updateStatus(status) {
5128
5128
  return this.send({ status_update: { status } });
5129
5129
  }
5130
- writeChatMessage(clan_id, channel_id, mode, content, mentions, attachments, references, anonymous_message, mention_everyone, notifi_content) {
5130
+ writeChatMessage(clan_id, channel_id, mode, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
5131
5131
  return __async(this, null, function* () {
5132
- const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, content, mentions, attachments, references, anonymous_message, mention_everyone, notifi_content } });
5132
+ const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
5133
5133
  return response.channel_message_ack;
5134
5134
  });
5135
5135
  }
@@ -5098,9 +5098,9 @@ var _DefaultSocket = class _DefaultSocket {
5098
5098
  updateStatus(status) {
5099
5099
  return this.send({ status_update: { status } });
5100
5100
  }
5101
- writeChatMessage(clan_id, channel_id, mode, content, mentions, attachments, references, anonymous_message, mention_everyone, notifi_content) {
5101
+ writeChatMessage(clan_id, channel_id, mode, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
5102
5102
  return __async(this, null, function* () {
5103
- const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, content, mentions, attachments, references, anonymous_message, mention_everyone, notifi_content } });
5103
+ const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
5104
5104
  return response.channel_message_ack;
5105
5105
  });
5106
5106
  }
package/dist/socket.d.ts CHANGED
@@ -255,7 +255,7 @@ interface ChannelMessageSend {
255
255
  attachments?: Array<MessageAttachmentEvent>;
256
256
  anonymous_message?: boolean;
257
257
  mention_everyone?: boolean;
258
- notifi_content: any;
258
+ avatar: string;
259
259
  };
260
260
  }
261
261
  /** Update a message previously sent to a realtime chat channel. */
@@ -484,6 +484,7 @@ export interface ChannelDescription {
484
484
  channel_private?: number;
485
485
  meeting_code?: string;
486
486
  clan_name?: string;
487
+ parrent_id?: string;
487
488
  }
488
489
  export interface HashtagDmListEvent {
489
490
  user_id?: Array<string>;
@@ -498,6 +499,7 @@ export interface HashtagDm {
498
499
  meeting_code?: string;
499
500
  type?: number;
500
501
  channel_private?: number;
502
+ parrent_id?: string;
501
503
  }
502
504
  /** A socket connection to Mezon server. */
503
505
  export interface Socket {
@@ -526,7 +528,7 @@ export interface Socket {
526
528
  /** Update the status for the current user online. */
527
529
  updateStatus(status?: string): Promise<void>;
528
530
  /** Send a chat message to a chat channel on the server. */
529
- 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>;
531
+ 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, avatar?: string): Promise<ChannelMessageAck>;
530
532
  /** Send message typing */
531
533
  writeMessageTyping(clan_id: string, channel_id: string, mode: number): Promise<MessageTypingEvent>;
532
534
  /** Send message reaction */
@@ -662,7 +664,7 @@ export declare class DefaultSocket implements Socket {
662
664
  unfollowUsers(user_ids: string[]): Promise<void>;
663
665
  updateChatMessage(clan_id: string, channel_id: string, mode: number, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>): Promise<ChannelMessageAck>;
664
666
  updateStatus(status?: string): Promise<void>;
665
- 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>;
667
+ 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, avatar?: string): Promise<ChannelMessageAck>;
666
668
  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>;
667
669
  writeMessageTyping(clan_id: string, channel_id: string, mode: number): Promise<MessageTypingEvent>;
668
670
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp: string): Promise<LastSeenMessageEvent>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.26",
3
+ "version": "2.8.28",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -364,7 +364,7 @@ interface ChannelMessageSend {
364
364
  //
365
365
  mention_everyone?: boolean;
366
366
  //
367
- notifi_content: any;
367
+ avatar: string;
368
368
  };
369
369
  }
370
370
 
@@ -697,6 +697,8 @@ export interface ChannelDescription {
697
697
  meeting_code?: string;
698
698
  //
699
699
  clan_name?: string;
700
+ //
701
+ parrent_id?: string;
700
702
  }
701
703
 
702
704
  // A list of Channel
@@ -725,6 +727,8 @@ export interface HashtagDm {
725
727
  type?: number;
726
728
  //
727
729
  channel_private?: number;
730
+ //
731
+ parrent_id?: string;
728
732
  }
729
733
 
730
734
  /** A socket connection to Mezon server. */
@@ -766,7 +770,7 @@ export interface Socket {
766
770
  updateStatus(status? : string) : Promise<void>;
767
771
 
768
772
  /** Send a chat message to a chat channel on the server. */
769
- 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>;
773
+ 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, avatar?: string) : Promise<ChannelMessageAck>;
770
774
 
771
775
  /** Send message typing */
772
776
  writeMessageTyping(clan_id: string, channel_id: string, mode: number) : Promise<MessageTypingEvent>;
@@ -1379,8 +1383,8 @@ export class DefaultSocket implements Socket {
1379
1383
  return this.send({status_update: {status: status}});
1380
1384
  }
1381
1385
 
1382
- 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> {
1383
- 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}});
1386
+ 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, avatar?: string ): Promise<ChannelMessageAck> {
1387
+ 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, avatar: avatar}});
1384
1388
  return response.channel_message_ack;
1385
1389
  }
1386
1390