mezon-js 2.7.67 → 2.7.68
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/dist/mezon-js.cjs.js +7 -0
- package/dist/mezon-js.esm.mjs +7 -0
- package/dist/socket.d.ts +3 -0
- package/package.json +1 -1
- package/socket.ts +11 -0
package/dist/mezon-js.cjs.js
CHANGED
|
@@ -4536,6 +4536,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
4536
4536
|
this.onmessagereaction(message.message_reaction_event);
|
|
4537
4537
|
} else if (message.channel_presence_event) {
|
|
4538
4538
|
this.onchannelpresence(message.channel_presence_event);
|
|
4539
|
+
} else if (message.last_pin_message_event) {
|
|
4540
|
+
this.onpinmessage(message.last_pin_message_event);
|
|
4539
4541
|
} else {
|
|
4540
4542
|
if (this.verbose && window && window.console) {
|
|
4541
4543
|
console.log("Unrecognized message received: %o", message);
|
|
@@ -4628,6 +4630,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
4628
4630
|
console.log(statusPresence);
|
|
4629
4631
|
}
|
|
4630
4632
|
}
|
|
4633
|
+
onpinmessage(pin) {
|
|
4634
|
+
if (this.verbose && window && window.console) {
|
|
4635
|
+
console.log(pin);
|
|
4636
|
+
}
|
|
4637
|
+
}
|
|
4631
4638
|
onvoiceended(voice) {
|
|
4632
4639
|
if (this.verbose && window && window.console) {
|
|
4633
4640
|
console.log(voice);
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -4507,6 +4507,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
4507
4507
|
this.onmessagereaction(message.message_reaction_event);
|
|
4508
4508
|
} else if (message.channel_presence_event) {
|
|
4509
4509
|
this.onchannelpresence(message.channel_presence_event);
|
|
4510
|
+
} else if (message.last_pin_message_event) {
|
|
4511
|
+
this.onpinmessage(message.last_pin_message_event);
|
|
4510
4512
|
} else {
|
|
4511
4513
|
if (this.verbose && window && window.console) {
|
|
4512
4514
|
console.log("Unrecognized message received: %o", message);
|
|
@@ -4599,6 +4601,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
4599
4601
|
console.log(statusPresence);
|
|
4600
4602
|
}
|
|
4601
4603
|
}
|
|
4604
|
+
onpinmessage(pin) {
|
|
4605
|
+
if (this.verbose && window && window.console) {
|
|
4606
|
+
console.log(pin);
|
|
4607
|
+
}
|
|
4608
|
+
}
|
|
4602
4609
|
onvoiceended(voice) {
|
|
4603
4610
|
if (this.verbose && window && window.console) {
|
|
4604
4611
|
console.log(voice);
|
package/dist/socket.d.ts
CHANGED
|
@@ -444,6 +444,8 @@ export interface Socket {
|
|
|
444
444
|
onmessagereaction: (messageReactionEvent: MessageReactionEvent) => void;
|
|
445
445
|
/** Receive channel presence updates. */
|
|
446
446
|
onchannelpresence: (channelPresence: ChannelPresenceEvent) => void;
|
|
447
|
+
/** pin message event */
|
|
448
|
+
onpinmessage: (pin: LastPinMessageEvent) => void;
|
|
447
449
|
onvoicestarted: (voice: VoiceStartedEvent) => void;
|
|
448
450
|
onvoiceended: (voice: VoiceEndedEvent) => void;
|
|
449
451
|
onvoicejoined: (voiceParticipant: VoiceJoinedEvent) => void;
|
|
@@ -489,6 +491,7 @@ export declare class DefaultSocket implements Socket {
|
|
|
489
491
|
onchannelpresence(channelPresence: ChannelPresenceEvent): void;
|
|
490
492
|
onnotification(notification: Notification): void;
|
|
491
493
|
onstatuspresence(statusPresence: StatusPresenceEvent): void;
|
|
494
|
+
onpinmessage(pin: LastPinMessageEvent): void;
|
|
492
495
|
onvoiceended(voice: VoiceEndedEvent): void;
|
|
493
496
|
onvoicestarted(voice: VoiceStartedEvent): void;
|
|
494
497
|
onvoicejoined(voiceParticipant: VoiceJoinedEvent): void;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
|
@@ -614,6 +614,9 @@ export interface Socket {
|
|
|
614
614
|
/** Receive channel presence updates. */
|
|
615
615
|
onchannelpresence: (channelPresence: ChannelPresenceEvent) => void;
|
|
616
616
|
|
|
617
|
+
/** pin message event */
|
|
618
|
+
onpinmessage: (pin: LastPinMessageEvent) => void;
|
|
619
|
+
|
|
617
620
|
// when someone start the voice room
|
|
618
621
|
onvoicestarted: (voice: VoiceStartedEvent) => void;
|
|
619
622
|
|
|
@@ -765,6 +768,8 @@ export class DefaultSocket implements Socket {
|
|
|
765
768
|
this.onmessagereaction(<MessageReactionEvent>message.message_reaction_event);
|
|
766
769
|
} else if (message.channel_presence_event) {
|
|
767
770
|
this.onchannelpresence(<ChannelPresenceEvent>message.channel_presence_event);
|
|
771
|
+
} else if (message.last_pin_message_event) {
|
|
772
|
+
this.onpinmessage(<LastPinMessageEvent>message.last_pin_message_event);
|
|
768
773
|
} else {
|
|
769
774
|
if (this.verbose && window && window.console) {
|
|
770
775
|
console.log("Unrecognized message received: %o", message);
|
|
@@ -874,6 +879,12 @@ export class DefaultSocket implements Socket {
|
|
|
874
879
|
}
|
|
875
880
|
}
|
|
876
881
|
|
|
882
|
+
onpinmessage(pin: LastPinMessageEvent) {
|
|
883
|
+
if (this.verbose && window && window.console) {
|
|
884
|
+
console.log(pin);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
877
888
|
onvoiceended(voice: VoiceEndedEvent) {
|
|
878
889
|
if (this.verbose && window && window.console) {
|
|
879
890
|
console.log(voice);
|