mezon-js 2.7.10 → 2.7.11

Sign up to get free protection for your applications and to get access to all the features.
package/dist/socket.d.ts CHANGED
@@ -122,17 +122,6 @@ export interface MessageAttachmentEvent {
122
122
  height?: number;
123
123
  }
124
124
  /** User is delete to message */
125
- export interface MessageDeletedEvent {
126
- /** The channel this message belongs to. */
127
- channel_id: string;
128
- mode: number;
129
- channel_label: string;
130
- /** The message that user react */
131
- message_id: string;
132
- /** Message sender, usually a user ID. */
133
- deletor: string;
134
- }
135
- /** User is delete to message */
136
125
  export interface MessageRefEvent {
137
126
  /** The channel this message belongs to. */
138
127
  channel_id: string;
@@ -555,8 +544,6 @@ export interface Socket {
555
544
  writeMessageTyping(channel_id: string, channel_label: string, mode: number): Promise<MessageTypingEvent>;
556
545
  /** Send message reaction */
557
546
  writeMessageReaction(id: string, channel_id: string, channel_label: string, mode: number, message_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<MessageReactionEvent>;
558
- /** Send message mention */
559
- writeMessageDeleted(channel_id: string, channel_label: string, mode: number, message_id: string, deletor: string): Promise<MessageDeletedEvent>;
560
547
  /** Send last seen message */
561
548
  writeLastSeenMessage(channel_id: string, channel_label: string, mode: number, message_id: string, timestamp: string): Promise<LastSeenMessageEvent>;
562
549
  /** send voice joined */
@@ -600,8 +587,6 @@ export interface Socket {
600
587
  onmessagetyping: (messageTypingEvent: MessageTypingEvent) => void;
601
588
  /** Receive reaction event */
602
589
  onmessagereaction: (messageReactionEvent: MessageReactionEvent) => void;
603
- /** Receive deleted message */
604
- onmessagedeleted: (messageDeletedEvent: MessageDeletedEvent) => void;
605
590
  /** Receive channel presence updates. */
606
591
  onchannelpresence: (channelPresence: ChannelPresenceEvent) => void;
607
592
  onvoicejoined: (voiceParticipant: VoiceJoinedEvent) => void;
@@ -642,7 +627,6 @@ export declare class DefaultSocket implements Socket {
642
627
  onerror(evt: Event): void;
643
628
  onmessagetyping(messagetyping: MessageTypingEvent): void;
644
629
  onmessagereaction(messagereaction: MessageReactionEvent): void;
645
- onmessagedeleted(messagedeleted: MessageDeletedEvent): void;
646
630
  onchannelmessage(channelMessage: ChannelMessageEvent): void;
647
631
  onchannelpresence(channelPresence: ChannelPresenceEvent): void;
648
632
  onnotification(notification: Notification): void;
@@ -682,7 +666,6 @@ export declare class DefaultSocket implements Socket {
682
666
  updateStatus(status?: string): Promise<void>;
683
667
  writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>): Promise<ChannelMessageAck>;
684
668
  writeMessageReaction(id: string, channel_id: string, channel_label: string, mode: number, message_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<MessageReactionEvent>;
685
- writeMessageDeleted(channel_id: string, channel_label: string, mode: number, message_id: string): Promise<MessageDeletedEvent>;
686
669
  writeMessageTyping(channel_id: string, channel_label: string, mode: number): Promise<MessageTypingEvent>;
687
670
  writeLastSeenMessage(channel_id: string, channel_label: string, mode: number, message_id: string, timestamp: string): Promise<LastSeenMessageEvent>;
688
671
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.10",
3
+ "version": "2.7.11",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -164,21 +164,6 @@ export interface MessageAttachmentEvent {
164
164
  height?: number;
165
165
  }
166
166
 
167
- /** User is delete to message */
168
- export interface MessageDeletedEvent {
169
- /** The channel this message belongs to. */
170
- channel_id:string;
171
- // The mode
172
- mode: number;
173
- // The channel label
174
- channel_label: string;
175
- /** The message that user react */
176
- message_id: string;
177
- /** Message sender, usually a user ID. */
178
- deletor: string;
179
- }
180
-
181
-
182
167
  /** User is delete to message */
183
168
  export interface MessageRefEvent {
184
169
  /** The channel this message belongs to. */
@@ -715,9 +700,6 @@ export interface Socket {
715
700
  /** Send message reaction */
716
701
  writeMessageReaction(id: string, channel_id: string, channel_label: string, mode: number, message_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean) : Promise<MessageReactionEvent>;
717
702
 
718
- /** Send message mention */
719
- writeMessageDeleted(channel_id: string, channel_label: string, mode: number, message_id: string, deletor: string) : Promise<MessageDeletedEvent>;
720
-
721
703
  /** Send last seen message */
722
704
  writeLastSeenMessage(channel_id: string, channel_label: string, mode: number, message_id: string, timestamp: string) : Promise<LastSeenMessageEvent>;
723
705
 
@@ -780,9 +762,6 @@ export interface Socket {
780
762
  /** Receive reaction event */
781
763
  onmessagereaction: (messageReactionEvent: MessageReactionEvent) => void;
782
764
 
783
- /** Receive deleted message */
784
- onmessagedeleted: (messageDeletedEvent: MessageDeletedEvent) => void;
785
-
786
765
  /** Receive channel presence updates. */
787
766
  onchannelpresence: (channelPresence: ChannelPresenceEvent) => void;
788
767
 
@@ -920,8 +899,6 @@ export class DefaultSocket implements Socket {
920
899
  this.onmessagetyping(<MessageTypingEvent>message.message_typing_event);
921
900
  } else if (message.message_reaction_event) {
922
901
  this.onmessagereaction(<MessageReactionEvent>message.message_reaction_event);
923
- } else if (message.message_deleted_event) {
924
- this.onmessagedeleted(<MessageDeletedEvent>message.message_deleted_event);
925
902
  } else if (message.channel_presence_event) {
926
903
  this.onchannelpresence(<ChannelPresenceEvent>message.channel_presence_event);
927
904
  } else if (message.party_data) {
@@ -1023,12 +1000,6 @@ export class DefaultSocket implements Socket {
1023
1000
  }
1024
1001
  }
1025
1002
 
1026
- onmessagedeleted(messagedeleted: MessageDeletedEvent) {
1027
- if (this.verbose && window && window.console) {
1028
- console.log(messagedeleted);
1029
- }
1030
- }
1031
-
1032
1003
  onchannelmessage(channelMessage: ChannelMessageEvent) {
1033
1004
  if (this.verbose && window && window.console) {
1034
1005
  console.log(channelMessage);
@@ -1310,11 +1281,6 @@ export class DefaultSocket implements Socket {
1310
1281
  return response.message_reaction_event
1311
1282
  }
1312
1283
 
1313
- async writeMessageDeleted(channel_id: string, channel_label: string, mode: number, message_id: string) : Promise<MessageDeletedEvent> {
1314
- const response = await this.send({message_deleted_event: {channel_id: channel_id, channel_label: channel_label, mode: mode, message_id: message_id}});
1315
- return response.message_deleted_event
1316
- }
1317
-
1318
1284
  async writeMessageTyping(channel_id: string, channel_label: string, mode: number) : Promise<MessageTypingEvent> {
1319
1285
  const response = await this.send({message_typing_event: {channel_id: channel_id, channel_label: channel_label, mode:mode}});
1320
1286
  return response.message_typing_event