mezon-js 2.7.16 → 2.7.17

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.
@@ -4093,9 +4093,9 @@ var _DefaultSocket = class _DefaultSocket {
4093
4093
  return response.voice_joined_event;
4094
4094
  });
4095
4095
  }
4096
- writeVoiceLeaved(id, clanId, voiceChannelId, lastParticipant) {
4096
+ writeVoiceLeaved(id, clanId, voiceChannelId, voiceUserId) {
4097
4097
  return __async(this, null, function* () {
4098
- const response = yield this.send({ voice_leaved_event: { id, clan_id: clanId, voice_channel_id: voiceChannelId, last_participant: lastParticipant } });
4098
+ const response = yield this.send({ voice_leaved_event: { id, clan_id: clanId, voice_channel_id: voiceChannelId, voice_user_id: voiceUserId } });
4099
4099
  return response.voice_leaved_event;
4100
4100
  });
4101
4101
  }
@@ -4065,9 +4065,9 @@ var _DefaultSocket = class _DefaultSocket {
4065
4065
  return response.voice_joined_event;
4066
4066
  });
4067
4067
  }
4068
- writeVoiceLeaved(id, clanId, voiceChannelId, lastParticipant) {
4068
+ writeVoiceLeaved(id, clanId, voiceChannelId, voiceUserId) {
4069
4069
  return __async(this, null, function* () {
4070
- const response = yield this.send({ voice_leaved_event: { id, clan_id: clanId, voice_channel_id: voiceChannelId, last_participant: lastParticipant } });
4070
+ const response = yield this.send({ voice_leaved_event: { id, clan_id: clanId, voice_channel_id: voiceChannelId, voice_user_id: voiceUserId } });
4071
4071
  return response.voice_leaved_event;
4072
4072
  });
4073
4073
  }
package/dist/socket.d.ts CHANGED
@@ -241,7 +241,7 @@ export interface VoiceLeavedEvent {
241
241
  id: string;
242
242
  clan_id: string;
243
243
  voice_channel_id: string;
244
- last_participant: boolean;
244
+ voice_user_id: string;
245
245
  }
246
246
  export interface VoiceJoinedEvent {
247
247
  /** The unique identifier of the chat channel. */
@@ -550,7 +550,7 @@ export interface Socket {
550
550
  /** send voice joined */
551
551
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
552
552
  /** send voice leaved */
553
- writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, lastParticipant: boolean): Promise<VoiceLeavedEvent>;
553
+ writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
554
554
  /** Handle disconnect events received from the socket. */
555
555
  ondisconnect: (evt: Event) => void;
556
556
  /** Handle error events received from the socket. */
@@ -670,7 +670,7 @@ export declare class DefaultSocket implements Socket {
670
670
  writeMessageTyping(channel_id: string, channel_label: string, mode: number): Promise<MessageTypingEvent>;
671
671
  writeLastSeenMessage(channel_id: string, channel_label: string, mode: number, message_id: string, timestamp: string): Promise<LastSeenMessageEvent>;
672
672
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
673
- writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, lastParticipant: boolean): Promise<VoiceLeavedEvent>;
673
+ writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
674
674
  private pingPong;
675
675
  }
676
676
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.16",
3
+ "version": "2.7.17",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -328,8 +328,8 @@ export interface VoiceLeavedEvent {
328
328
  clan_id: string;
329
329
  // voice channel name
330
330
  voice_channel_id: string;
331
- // last participant
332
- last_participant: boolean;
331
+ // voice user id
332
+ voice_user_id: string;
333
333
  }
334
334
 
335
335
  export interface VoiceJoinedEvent {
@@ -709,7 +709,7 @@ export interface Socket {
709
709
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string) : Promise<VoiceJoinedEvent>;
710
710
 
711
711
  /** send voice leaved */
712
- writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, lastParticipant: boolean) : Promise<VoiceLeavedEvent>;
712
+ writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string) : Promise<VoiceLeavedEvent>;
713
713
 
714
714
  /** Handle disconnect events received from the socket. */
715
715
  ondisconnect: (evt: Event) => void;
@@ -1298,8 +1298,8 @@ export class DefaultSocket implements Socket {
1298
1298
  return response.voice_joined_event
1299
1299
  }
1300
1300
 
1301
- async writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, lastParticipant: boolean) : Promise<VoiceLeavedEvent> {
1302
- const response = await this.send({voice_leaved_event: {id: id, clan_id: clanId, voice_channel_id: voiceChannelId, last_participant: lastParticipant}});
1301
+ async writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string) : Promise<VoiceLeavedEvent> {
1302
+ const response = await this.send({voice_leaved_event: {id: id, clan_id: clanId, voice_channel_id: voiceChannelId, voice_user_id: voiceUserId}});
1303
1303
  return response.voice_leaved_event
1304
1304
  }
1305
1305