mezon-js 2.8.46 → 2.8.48
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/mezon-js.cjs.js +9 -2
- package/dist/mezon-js.esm.mjs +9 -2
- package/dist/socket.d.ts +7 -0
- package/package.json +1 -2
- package/socket.ts +20 -2
package/dist/mezon-js.cjs.js
CHANGED
@@ -4739,9 +4739,11 @@ 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.onuserprofileupdate(message.user_profile_updated_event);
|
4746
|
+
} else if (message.user_channel_removed_event) {
|
4745
4747
|
this.onuserchannelremoved(message.user_channel_removed_event);
|
4746
4748
|
} else if (message.user_clan_removed_event) {
|
4747
4749
|
this.onuserclanremoved(message.user_clan_removed_event);
|
@@ -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,9 +4710,11 @@ 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.onuserprofileupdate(message.user_profile_updated_event);
|
4717
|
+
} else if (message.user_channel_removed_event) {
|
4716
4718
|
this.onuserchannelremoved(message.user_channel_removed_event);
|
4717
4719
|
} else if (message.user_clan_removed_event) {
|
4718
4720
|
this.onuserclanremoved(message.user_clan_removed_event);
|
@@ -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;
|
@@ -535,6 +539,8 @@ export interface Socket {
|
|
535
539
|
onpinmessage: (pin: LastPinMessageEvent) => void;
|
536
540
|
/** Receive added user event */
|
537
541
|
onuserchanneladded: (user: UserChannelAddedEvent) => void;
|
542
|
+
/** Receive added user clan event */
|
543
|
+
onuserclanadded: (user: AddClanUserEvent) => void;
|
538
544
|
/** Receive update user event */
|
539
545
|
onuserprofileupdate: (user: UserProfileUpdatedEvent) => void;
|
540
546
|
/** Receive channel removed user event */
|
@@ -599,6 +605,7 @@ export declare class DefaultSocket implements Socket {
|
|
599
605
|
onchannelmessage(channelMessage: ChannelMessage): void;
|
600
606
|
onchannelpresence(channelPresence: ChannelPresenceEvent): void;
|
601
607
|
onuserchanneladded(user: UserChannelAddedEvent): void;
|
608
|
+
onuserclanadded(user: AddClanUserEvent): void;
|
602
609
|
onuserprofileupdate(user: UserProfileUpdatedEvent): void;
|
603
610
|
onuserchannelremoved(user: UserChannelRemovedEvent): void;
|
604
611
|
onuserclanremoved(user: UserClanRemovedEvent): void;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mezon-js",
|
3
|
-
"version": "2.8.
|
3
|
+
"version": "2.8.48",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
|
6
6
|
},
|
@@ -38,7 +38,6 @@
|
|
38
38
|
"base64-arraybuffer": "^1.0.2",
|
39
39
|
"esbuild": "^0.19.11",
|
40
40
|
"js-base64": "^3.7.4",
|
41
|
-
"mezon-js": "file:",
|
42
41
|
"whatwg-fetch": "^3.6.2"
|
43
42
|
},
|
44
43
|
"devDependencies": {
|
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
|
@@ -789,6 +796,9 @@ export interface Socket {
|
|
789
796
|
/** Receive added user event */
|
790
797
|
onuserchanneladded: (user: UserChannelAddedEvent) => void;
|
791
798
|
|
799
|
+
/** Receive added user clan event */
|
800
|
+
onuserclanadded: (user: AddClanUserEvent) => void;
|
801
|
+
|
792
802
|
/** Receive update user event */
|
793
803
|
onuserprofileupdate: (user: UserProfileUpdatedEvent) => void;
|
794
804
|
|
@@ -1012,9 +1022,11 @@ export class DefaultSocket implements Socket {
|
|
1012
1022
|
this.oncustomstatus(<CustomStatusEvent>message.custom_status_event);
|
1013
1023
|
} else if (message.user_channel_added_event) {
|
1014
1024
|
this.onuserchanneladded(<UserChannelAddedEvent>message.user_channel_added_event);
|
1015
|
-
} else if (message.
|
1016
|
-
this.
|
1025
|
+
} else if (message.add_clan_user_event) {
|
1026
|
+
this.onuserclanadded(<AddClanUserEvent>message.add_clan_user_event);
|
1017
1027
|
} else if (message.user_profile_updated_event) {
|
1028
|
+
this.onuserprofileupdate(<UserProfileUpdatedEvent>message.user_profile_updated_event);
|
1029
|
+
} else if (message.user_channel_removed_event) {
|
1018
1030
|
this.onuserchannelremoved(<UserChannelRemovedEvent>message.user_channel_removed_event);
|
1019
1031
|
} else if (message.user_clan_removed_event) {
|
1020
1032
|
this.onuserclanremoved(<UserClanRemovedEvent>message.user_clan_removed_event);
|
@@ -1121,6 +1133,12 @@ export class DefaultSocket implements Socket {
|
|
1121
1133
|
}
|
1122
1134
|
}
|
1123
1135
|
|
1136
|
+
onuserclanadded(user: AddClanUserEvent) {
|
1137
|
+
if (this.verbose && window && window.console) {
|
1138
|
+
console.log(user);
|
1139
|
+
}
|
1140
|
+
}
|
1141
|
+
|
1124
1142
|
onuserprofileupdate(user: UserProfileUpdatedEvent) {
|
1125
1143
|
if (this.verbose && window && window.console) {
|
1126
1144
|
console.log(user);
|