mezon-js 2.8.47 → 2.8.49
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 +10 -3
- package/dist/mezon-js.esm.mjs +10 -3
- package/dist/socket.d.ts +8 -0
- package/package.json +1 -1
- package/socket.ts +23 -3
package/dist/mezon-js.cjs.js
CHANGED
@@ -4739,11 +4739,13 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4739
4739
|
this.oncustomstatus(message.custom_status_event);
|
4740
4740
|
} else if (message.user_channel_added_event) {
|
4741
4741
|
this.onuserchanneladded(message.user_channel_added_event);
|
4742
|
-
} else if (message.
|
4743
|
-
this.
|
4742
|
+
} else if (message.add_clan_user_event) {
|
4743
|
+
this.onuserclanadded(message.add_clan_user_event);
|
4744
4744
|
} else if (message.user_profile_updated_event) {
|
4745
|
-
this.
|
4745
|
+
this.onuserprofileupdate(message.user_profile_updated_event);
|
4746
4746
|
} else if (message.user_channel_removed_event) {
|
4747
|
+
this.onuserchannelremoved(message.user_channel_removed_event);
|
4748
|
+
} else if (message.user_clan_removed_event) {
|
4747
4749
|
this.onuserclanremoved(message.user_clan_removed_event);
|
4748
4750
|
} else {
|
4749
4751
|
if (this.verbose && window && window.console) {
|
@@ -4832,6 +4834,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4832
4834
|
console.log(user);
|
4833
4835
|
}
|
4834
4836
|
}
|
4837
|
+
onuserclanadded(user) {
|
4838
|
+
if (this.verbose && window && window.console) {
|
4839
|
+
console.log(user);
|
4840
|
+
}
|
4841
|
+
}
|
4835
4842
|
onuserprofileupdate(user) {
|
4836
4843
|
if (this.verbose && window && window.console) {
|
4837
4844
|
console.log(user);
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -4710,11 +4710,13 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4710
4710
|
this.oncustomstatus(message.custom_status_event);
|
4711
4711
|
} else if (message.user_channel_added_event) {
|
4712
4712
|
this.onuserchanneladded(message.user_channel_added_event);
|
4713
|
-
} else if (message.
|
4714
|
-
this.
|
4713
|
+
} else if (message.add_clan_user_event) {
|
4714
|
+
this.onuserclanadded(message.add_clan_user_event);
|
4715
4715
|
} else if (message.user_profile_updated_event) {
|
4716
|
-
this.
|
4716
|
+
this.onuserprofileupdate(message.user_profile_updated_event);
|
4717
4717
|
} else if (message.user_channel_removed_event) {
|
4718
|
+
this.onuserchannelremoved(message.user_channel_removed_event);
|
4719
|
+
} else if (message.user_clan_removed_event) {
|
4718
4720
|
this.onuserclanremoved(message.user_clan_removed_event);
|
4719
4721
|
} else {
|
4720
4722
|
if (this.verbose && window && window.console) {
|
@@ -4803,6 +4805,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4803
4805
|
console.log(user);
|
4804
4806
|
}
|
4805
4807
|
}
|
4808
|
+
onuserclanadded(user) {
|
4809
|
+
if (this.verbose && window && window.console) {
|
4810
|
+
console.log(user);
|
4811
|
+
}
|
4812
|
+
}
|
4806
4813
|
onuserprofileupdate(user) {
|
4807
4814
|
if (this.verbose && window && window.console) {
|
4808
4815
|
console.log(user);
|
package/dist/socket.d.ts
CHANGED
@@ -71,6 +71,10 @@ interface ChannelLeave {
|
|
71
71
|
channel_label: string;
|
72
72
|
};
|
73
73
|
}
|
74
|
+
export interface AddClanUserEvent {
|
75
|
+
clan_id: string;
|
76
|
+
user_id: string;
|
77
|
+
}
|
74
78
|
/** UserChannelAddedEvent */
|
75
79
|
export interface UserChannelAddedEvent {
|
76
80
|
channel_id: string;
|
@@ -87,6 +91,7 @@ export interface AddUsers {
|
|
87
91
|
export interface UserChannelRemovedEvent {
|
88
92
|
channel_id: string;
|
89
93
|
user_ids: string[];
|
94
|
+
channel_type: number;
|
90
95
|
}
|
91
96
|
export interface UserClanRemovedEvent {
|
92
97
|
clan_id: string;
|
@@ -535,6 +540,8 @@ export interface Socket {
|
|
535
540
|
onpinmessage: (pin: LastPinMessageEvent) => void;
|
536
541
|
/** Receive added user event */
|
537
542
|
onuserchanneladded: (user: UserChannelAddedEvent) => void;
|
543
|
+
/** Receive added user clan event */
|
544
|
+
onuserclanadded: (user: AddClanUserEvent) => void;
|
538
545
|
/** Receive update user event */
|
539
546
|
onuserprofileupdate: (user: UserProfileUpdatedEvent) => void;
|
540
547
|
/** Receive channel removed user event */
|
@@ -599,6 +606,7 @@ export declare class DefaultSocket implements Socket {
|
|
599
606
|
onchannelmessage(channelMessage: ChannelMessage): void;
|
600
607
|
onchannelpresence(channelPresence: ChannelPresenceEvent): void;
|
601
608
|
onuserchanneladded(user: UserChannelAddedEvent): void;
|
609
|
+
onuserclanadded(user: AddClanUserEvent): void;
|
602
610
|
onuserprofileupdate(user: UserProfileUpdatedEvent): void;
|
603
611
|
onuserchannelremoved(user: UserChannelRemovedEvent): void;
|
604
612
|
onuserclanremoved(user: UserClanRemovedEvent): void;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -88,6 +88,13 @@ interface ChannelLeave {
|
|
88
88
|
};
|
89
89
|
}
|
90
90
|
|
91
|
+
export interface AddClanUserEvent {
|
92
|
+
//the clan id
|
93
|
+
clan_id: string;
|
94
|
+
// the user id
|
95
|
+
user_id: string;
|
96
|
+
}
|
97
|
+
|
91
98
|
/** UserChannelAddedEvent */
|
92
99
|
export interface UserChannelAddedEvent {
|
93
100
|
// the channel id
|
@@ -116,6 +123,8 @@ export interface UserChannelRemovedEvent {
|
|
116
123
|
channel_id: string;
|
117
124
|
// the user_id
|
118
125
|
user_ids: string[];
|
126
|
+
// the channel type
|
127
|
+
channel_type: number
|
119
128
|
}
|
120
129
|
|
121
130
|
export interface UserClanRemovedEvent {
|
@@ -789,6 +798,9 @@ export interface Socket {
|
|
789
798
|
/** Receive added user event */
|
790
799
|
onuserchanneladded: (user: UserChannelAddedEvent) => void;
|
791
800
|
|
801
|
+
/** Receive added user clan event */
|
802
|
+
onuserclanadded: (user: AddClanUserEvent) => void;
|
803
|
+
|
792
804
|
/** Receive update user event */
|
793
805
|
onuserprofileupdate: (user: UserProfileUpdatedEvent) => void;
|
794
806
|
|
@@ -1012,11 +1024,13 @@ export class DefaultSocket implements Socket {
|
|
1012
1024
|
this.oncustomstatus(<CustomStatusEvent>message.custom_status_event);
|
1013
1025
|
} else if (message.user_channel_added_event) {
|
1014
1026
|
this.onuserchanneladded(<UserChannelAddedEvent>message.user_channel_added_event);
|
1015
|
-
} else if (message.
|
1016
|
-
this.
|
1027
|
+
} else if (message.add_clan_user_event) {
|
1028
|
+
this.onuserclanadded(<AddClanUserEvent>message.add_clan_user_event);
|
1017
1029
|
} else if (message.user_profile_updated_event) {
|
1018
|
-
this.
|
1030
|
+
this.onuserprofileupdate(<UserProfileUpdatedEvent>message.user_profile_updated_event);
|
1019
1031
|
} else if (message.user_channel_removed_event) {
|
1032
|
+
this.onuserchannelremoved(<UserChannelRemovedEvent>message.user_channel_removed_event);
|
1033
|
+
} else if (message.user_clan_removed_event) {
|
1020
1034
|
this.onuserclanremoved(<UserClanRemovedEvent>message.user_clan_removed_event);
|
1021
1035
|
} else {
|
1022
1036
|
if (this.verbose && window && window.console) {
|
@@ -1121,6 +1135,12 @@ export class DefaultSocket implements Socket {
|
|
1121
1135
|
}
|
1122
1136
|
}
|
1123
1137
|
|
1138
|
+
onuserclanadded(user: AddClanUserEvent) {
|
1139
|
+
if (this.verbose && window && window.console) {
|
1140
|
+
console.log(user);
|
1141
|
+
}
|
1142
|
+
}
|
1143
|
+
|
1124
1144
|
onuserprofileupdate(user: UserProfileUpdatedEvent) {
|
1125
1145
|
if (this.verbose && window && window.console) {
|
1126
1146
|
console.log(user);
|