mezon-js 2.14.2 → 2.14.4
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/socket.d.ts +927 -450
- package/dist/mezon-js/types/index.d.ts +0 -62
- package/dist/mezon-js.cjs.js +233 -190
- package/dist/mezon-js.esm.mjs +233 -190
- package/dist/mezon-js.esm.mjs.map +1 -1
- package/dist/socket.d.ts +927 -450
- package/dist/types/index.d.ts +0 -62
- package/package.json +1 -1
- package/socket.ts +1793 -882
- package/types/index.ts +0 -117
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -35015,30 +35015,30 @@ function createChannelMessageFromEvent(message) {
|
|
|
35015
35015
|
var channelMessage = {
|
|
35016
35016
|
id: message.id || message.channel_message.message_id,
|
|
35017
35017
|
avatar: message.channel_message.avatar,
|
|
35018
|
-
|
|
35018
|
+
channel_id: message.channel_message.channel_id,
|
|
35019
35019
|
mode: message.channel_message.mode,
|
|
35020
|
-
|
|
35021
|
-
|
|
35020
|
+
channel_label: message.channel_message.channel_label,
|
|
35021
|
+
clan_id: message.channel_message.clan_id,
|
|
35022
35022
|
code: message.channel_message.code,
|
|
35023
|
-
|
|
35024
|
-
|
|
35025
|
-
|
|
35026
|
-
|
|
35023
|
+
message_id: message.channel_message.message_id,
|
|
35024
|
+
sender_id: message.channel_message.sender_id,
|
|
35025
|
+
clan_logo: message.channel_message.clan_logo,
|
|
35026
|
+
category_name: message.channel_message.category_name,
|
|
35027
35027
|
username: message.channel_message.username,
|
|
35028
|
-
|
|
35029
|
-
|
|
35030
|
-
|
|
35028
|
+
clan_nick: message.channel_message.clan_nick,
|
|
35029
|
+
clan_avatar: message.channel_message.clan_avatar,
|
|
35030
|
+
display_name: message.channel_message.display_name,
|
|
35031
35031
|
content,
|
|
35032
35032
|
reactions,
|
|
35033
35033
|
mentions,
|
|
35034
35034
|
attachments,
|
|
35035
|
-
|
|
35035
|
+
referenced_message: [],
|
|
35036
35036
|
references,
|
|
35037
|
-
|
|
35038
|
-
|
|
35039
|
-
|
|
35040
|
-
|
|
35041
|
-
|
|
35037
|
+
hide_editted: message.channel_message.hide_editted,
|
|
35038
|
+
is_public: message.channel_message.is_public,
|
|
35039
|
+
create_time_seconds: message.channel_message.create_time_seconds,
|
|
35040
|
+
update_time_seconds: message.channel_message.update_time_seconds,
|
|
35041
|
+
topic_id: message.channel_message.topic_id
|
|
35042
35042
|
};
|
|
35043
35043
|
return channelMessage;
|
|
35044
35044
|
}
|
|
@@ -35100,11 +35100,12 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35100
35100
|
}
|
|
35101
35101
|
if (!message.cid) {
|
|
35102
35102
|
if (message.notifications) {
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
|
|
35106
|
-
|
|
35107
|
-
|
|
35103
|
+
message.notifications.notifications.forEach(
|
|
35104
|
+
(n) => {
|
|
35105
|
+
n.content = n.content ? safeJSONParse(n.content) : void 0;
|
|
35106
|
+
this.onnotification(n);
|
|
35107
|
+
}
|
|
35108
|
+
);
|
|
35108
35109
|
} else if (message.voice_started_event) {
|
|
35109
35110
|
this.onvoicestarted(message.voice_started_event);
|
|
35110
35111
|
} else if (message.voice_ended_event) {
|
|
@@ -35122,9 +35123,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35122
35123
|
} else if (message.event_emoji) {
|
|
35123
35124
|
this.oneventemoji(message.event_emoji);
|
|
35124
35125
|
} else if (message.noti_user_channel) {
|
|
35125
|
-
this.oneventnotiuserchannel(
|
|
35126
|
-
message.noti_user_channel
|
|
35127
|
-
);
|
|
35126
|
+
this.oneventnotiuserchannel(message.noti_user_channel);
|
|
35128
35127
|
} else if (message.webhook_event) {
|
|
35129
35128
|
this.oneventwebhook(message.webhook_event);
|
|
35130
35129
|
} else if (message.channel_deleted_event) {
|
|
@@ -35142,44 +35141,58 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35142
35141
|
} else if (message.delete_account_event) {
|
|
35143
35142
|
this.ondeleteaccount(message.delete_account_event);
|
|
35144
35143
|
} else if (message.clan_profile_updated_event) {
|
|
35145
|
-
this.onclanprofileupdated(
|
|
35146
|
-
message.clan_profile_updated_event
|
|
35147
|
-
);
|
|
35144
|
+
this.onclanprofileupdated(message.clan_profile_updated_event);
|
|
35148
35145
|
} else if (message.clan_updated_event) {
|
|
35149
35146
|
this.onclanupdated(message.clan_updated_event);
|
|
35150
35147
|
} else if (message.last_seen_message_event) {
|
|
35151
|
-
this.onlastseenupdated(
|
|
35152
|
-
message.last_seen_message_event
|
|
35153
|
-
);
|
|
35148
|
+
this.onlastseenupdated(message.last_seen_message_event);
|
|
35154
35149
|
} else if (message.status_presence_event) {
|
|
35155
|
-
this.onstatuspresence(
|
|
35150
|
+
this.onstatuspresence(
|
|
35151
|
+
message.status_presence_event
|
|
35152
|
+
);
|
|
35156
35153
|
} else if (message.stream_presence_event) {
|
|
35157
|
-
this.onstreampresence(
|
|
35154
|
+
this.onstreampresence(
|
|
35155
|
+
message.stream_presence_event
|
|
35156
|
+
);
|
|
35158
35157
|
} else if (message.stream_data) {
|
|
35159
35158
|
this.onstreamdata(message.stream_data);
|
|
35160
35159
|
} else if (message.channel_message) {
|
|
35161
35160
|
const channelMessage = createChannelMessageFromEvent(message);
|
|
35162
35161
|
this.onchannelmessage(channelMessage);
|
|
35163
35162
|
} else if (message.message_typing_event) {
|
|
35164
|
-
this.onmessagetyping(
|
|
35163
|
+
this.onmessagetyping(
|
|
35164
|
+
message.message_typing_event
|
|
35165
|
+
);
|
|
35165
35166
|
} else if (message.message_reaction_event) {
|
|
35166
|
-
this.onmessagereaction(
|
|
35167
|
+
this.onmessagereaction(
|
|
35168
|
+
message.message_reaction_event
|
|
35169
|
+
);
|
|
35167
35170
|
} else if (message.channel_presence_event) {
|
|
35168
|
-
this.onchannelpresence(
|
|
35171
|
+
this.onchannelpresence(
|
|
35172
|
+
message.channel_presence_event
|
|
35173
|
+
);
|
|
35169
35174
|
} else if (message.last_pin_message_event) {
|
|
35170
|
-
this.onpinmessage(
|
|
35175
|
+
this.onpinmessage(
|
|
35176
|
+
message.last_pin_message_event
|
|
35177
|
+
);
|
|
35171
35178
|
} else if (message.custom_status_event) {
|
|
35172
35179
|
this.oncustomstatus(message.custom_status_event);
|
|
35173
35180
|
} else if (message.canvas_event) {
|
|
35174
35181
|
this.oncanvasevent(message.canvas_event);
|
|
35175
35182
|
} else if (message.user_channel_added_event) {
|
|
35176
|
-
this.onuserchanneladded(
|
|
35183
|
+
this.onuserchanneladded(
|
|
35184
|
+
message.user_channel_added_event
|
|
35185
|
+
);
|
|
35177
35186
|
} else if (message.add_clan_user_event) {
|
|
35178
35187
|
this.onuserclanadded(message.add_clan_user_event);
|
|
35179
35188
|
} else if (message.user_profile_updated_event) {
|
|
35180
|
-
this.onuserprofileupdate(
|
|
35189
|
+
this.onuserprofileupdate(
|
|
35190
|
+
message.user_profile_updated_event
|
|
35191
|
+
);
|
|
35181
35192
|
} else if (message.user_channel_removed_event) {
|
|
35182
|
-
this.onuserchannelremoved(
|
|
35193
|
+
this.onuserchannelremoved(
|
|
35194
|
+
message.user_channel_removed_event
|
|
35195
|
+
);
|
|
35183
35196
|
} else if (message.block_friend) {
|
|
35184
35197
|
this.onblockfriend(message.block_friend);
|
|
35185
35198
|
} else if (message.un_block_friend) {
|
|
@@ -35189,7 +35202,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35189
35202
|
} else if (message.remove_friend) {
|
|
35190
35203
|
this.onremovefriend(message.remove_friend);
|
|
35191
35204
|
} else if (message.user_clan_removed_event) {
|
|
35192
|
-
this.onuserclanremoved(
|
|
35205
|
+
this.onuserclanremoved(
|
|
35206
|
+
message.user_clan_removed_event
|
|
35207
|
+
);
|
|
35193
35208
|
} else if (message.clan_event_created) {
|
|
35194
35209
|
this.oneventcreated(message.clan_event_created);
|
|
35195
35210
|
} else if (message.give_coffee_event) {
|
|
@@ -35197,31 +35212,49 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35197
35212
|
} else if (message.role_assign_event) {
|
|
35198
35213
|
this.onroleassign(message.role_assign_event);
|
|
35199
35214
|
} else if (message.streaming_started_event) {
|
|
35200
|
-
this.onstreamingchannelstarted(
|
|
35215
|
+
this.onstreamingchannelstarted(
|
|
35216
|
+
message.streaming_started_event
|
|
35217
|
+
);
|
|
35201
35218
|
} else if (message.streaming_ended_event) {
|
|
35202
|
-
this.onstreamingchannelended(
|
|
35219
|
+
this.onstreamingchannelended(
|
|
35220
|
+
message.streaming_ended_event
|
|
35221
|
+
);
|
|
35203
35222
|
} else if (message.streaming_joined_event) {
|
|
35204
|
-
this.onstreamingchanneljoined(
|
|
35223
|
+
this.onstreamingchanneljoined(
|
|
35224
|
+
message.streaming_joined_event
|
|
35225
|
+
);
|
|
35205
35226
|
} else if (message.streaming_leaved_event) {
|
|
35206
|
-
this.onstreamingchannelleaved(
|
|
35227
|
+
this.onstreamingchannelleaved(
|
|
35228
|
+
message.streaming_leaved_event
|
|
35229
|
+
);
|
|
35207
35230
|
} else if (message.permission_set_event) {
|
|
35208
35231
|
this.onpermissionset(message.permission_set_event);
|
|
35209
35232
|
} else if (message.permission_changed_event) {
|
|
35210
|
-
this.onpermissionchanged(
|
|
35233
|
+
this.onpermissionchanged(
|
|
35234
|
+
message.permission_changed_event
|
|
35235
|
+
);
|
|
35211
35236
|
} else if (message.unmute_event) {
|
|
35212
35237
|
this.onunmuteevent(message.unmute_event);
|
|
35213
35238
|
} else if (message.token_sent_event) {
|
|
35214
35239
|
this.ontokensent(message.token_sent_event);
|
|
35215
35240
|
} else if (message.message_button_clicked) {
|
|
35216
|
-
this.onmessagebuttonclicked(
|
|
35241
|
+
this.onmessagebuttonclicked(
|
|
35242
|
+
message.message_button_clicked
|
|
35243
|
+
);
|
|
35217
35244
|
} else if (message.dropdown_box_selected) {
|
|
35218
|
-
this.onmessagedropdownboxselected(
|
|
35245
|
+
this.onmessagedropdownboxselected(
|
|
35246
|
+
message.dropdown_box_selected
|
|
35247
|
+
);
|
|
35219
35248
|
} else if (message.mark_as_read) {
|
|
35220
35249
|
this.onmarkasread(message.mark_as_read);
|
|
35221
35250
|
} else if (message.voice_reaction_send) {
|
|
35222
|
-
this.onvoicereactionmessage(
|
|
35251
|
+
this.onvoicereactionmessage(
|
|
35252
|
+
message.voice_reaction_send
|
|
35253
|
+
);
|
|
35223
35254
|
} else if (message.webrtc_signaling_fwd) {
|
|
35224
|
-
this.onwebrtcsignalingfwd(
|
|
35255
|
+
this.onwebrtcsignalingfwd(
|
|
35256
|
+
message.webrtc_signaling_fwd
|
|
35257
|
+
);
|
|
35225
35258
|
} else if (message.list_activity) {
|
|
35226
35259
|
this.onactivityupdated(message.list_activity);
|
|
35227
35260
|
} else if (message.sd_topic_event) {
|
|
@@ -35231,19 +35264,29 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35231
35264
|
} else if (message.user_status_event) {
|
|
35232
35265
|
this.onuserstatusevent(message.user_status_event);
|
|
35233
35266
|
} else if (message.join_channel_app_data) {
|
|
35234
|
-
this.onjoinchannelappevent(
|
|
35267
|
+
this.onjoinchannelappevent(
|
|
35268
|
+
message.join_channel_app_data
|
|
35269
|
+
);
|
|
35235
35270
|
} else if (message.unpin_message_event) {
|
|
35236
|
-
this.onunpinmessageevent(
|
|
35271
|
+
this.onunpinmessageevent(
|
|
35272
|
+
message.unpin_message_event
|
|
35273
|
+
);
|
|
35237
35274
|
} else if (message.quick_menu_event) {
|
|
35238
35275
|
this.onquickmenuevent(message.quick_menu_event);
|
|
35239
35276
|
} else if (message.meet_participant_event) {
|
|
35240
|
-
this.onmeetparticipantevent(
|
|
35277
|
+
this.onmeetparticipantevent(
|
|
35278
|
+
message.meet_participant_event
|
|
35279
|
+
);
|
|
35241
35280
|
} else if (message.transfer_ownership_event) {
|
|
35242
|
-
this.ontransferownership(
|
|
35281
|
+
this.ontransferownership(
|
|
35282
|
+
message.transfer_ownership_event
|
|
35283
|
+
);
|
|
35243
35284
|
} else if (message.ban_user_event) {
|
|
35244
35285
|
this.onbanneduser(message.ban_user_event);
|
|
35245
35286
|
} else if (message.allow_anonymous_event) {
|
|
35246
|
-
this.onallowanonymousevent(
|
|
35287
|
+
this.onallowanonymousevent(
|
|
35288
|
+
message.allow_anonymous_event
|
|
35289
|
+
);
|
|
35247
35290
|
} else {
|
|
35248
35291
|
if (this.verbose && window && window.console) {
|
|
35249
35292
|
console.log("Unrecognized message received: %o", message);
|
|
@@ -35717,14 +35760,14 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35717
35760
|
return response.status;
|
|
35718
35761
|
});
|
|
35719
35762
|
}
|
|
35720
|
-
joinClanChat(
|
|
35763
|
+
joinClanChat(clan_id) {
|
|
35721
35764
|
return __async(this, null, function* () {
|
|
35722
35765
|
const response = yield this.send({
|
|
35723
35766
|
clan_join: {
|
|
35724
|
-
clan_id
|
|
35767
|
+
clan_id
|
|
35725
35768
|
}
|
|
35726
35769
|
});
|
|
35727
|
-
return response.
|
|
35770
|
+
return response.clan_join;
|
|
35728
35771
|
});
|
|
35729
35772
|
}
|
|
35730
35773
|
follower() {
|
|
@@ -35732,57 +35775,57 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35732
35775
|
const response = yield this.send({
|
|
35733
35776
|
follow_event: {}
|
|
35734
35777
|
});
|
|
35735
|
-
return response.
|
|
35778
|
+
return response.follow_event;
|
|
35736
35779
|
});
|
|
35737
35780
|
}
|
|
35738
|
-
joinChat(
|
|
35781
|
+
joinChat(clan_id, channel_id, channel_type, is_public) {
|
|
35739
35782
|
return __async(this, null, function* () {
|
|
35740
35783
|
const response = yield this.send({
|
|
35741
35784
|
channel_join: {
|
|
35742
|
-
clan_id
|
|
35743
|
-
channel_id
|
|
35744
|
-
channel_type
|
|
35745
|
-
is_public
|
|
35785
|
+
clan_id,
|
|
35786
|
+
channel_id,
|
|
35787
|
+
channel_type,
|
|
35788
|
+
is_public
|
|
35746
35789
|
}
|
|
35747
35790
|
});
|
|
35748
35791
|
return response.channel;
|
|
35749
35792
|
});
|
|
35750
35793
|
}
|
|
35751
|
-
handleParticipantMeetState(
|
|
35794
|
+
handleParticipantMeetState(clan_id, channel_id, display_name, state, room_name) {
|
|
35752
35795
|
return __async(this, null, function* () {
|
|
35753
35796
|
const response = yield this.send({
|
|
35754
35797
|
handle_participant_meet_state_event: {
|
|
35755
|
-
clan_id
|
|
35756
|
-
channel_id
|
|
35757
|
-
display_name
|
|
35798
|
+
clan_id,
|
|
35799
|
+
channel_id,
|
|
35800
|
+
display_name,
|
|
35758
35801
|
state,
|
|
35759
|
-
room_name
|
|
35802
|
+
room_name
|
|
35760
35803
|
}
|
|
35761
35804
|
});
|
|
35762
|
-
return response.
|
|
35805
|
+
return response.handle_participant_meet_state_event;
|
|
35763
35806
|
});
|
|
35764
35807
|
}
|
|
35765
|
-
leaveChat(
|
|
35808
|
+
leaveChat(clan_id, channel_id, channel_type, is_public) {
|
|
35766
35809
|
return this.send({
|
|
35767
35810
|
channel_leave: {
|
|
35768
|
-
clan_id
|
|
35769
|
-
channel_id
|
|
35770
|
-
channel_type
|
|
35771
|
-
is_public
|
|
35811
|
+
clan_id,
|
|
35812
|
+
channel_id,
|
|
35813
|
+
channel_type,
|
|
35814
|
+
is_public
|
|
35772
35815
|
}
|
|
35773
35816
|
});
|
|
35774
35817
|
}
|
|
35775
|
-
removeChatMessage(
|
|
35818
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id, mentions, references) {
|
|
35776
35819
|
return __async(this, null, function* () {
|
|
35777
35820
|
const response = yield this.send({
|
|
35778
35821
|
channel_message_remove: {
|
|
35779
|
-
clan_id
|
|
35780
|
-
channel_id
|
|
35822
|
+
clan_id,
|
|
35823
|
+
channel_id,
|
|
35781
35824
|
mode,
|
|
35782
|
-
message_id
|
|
35783
|
-
is_public
|
|
35784
|
-
has_attachment
|
|
35785
|
-
topic_id
|
|
35825
|
+
message_id,
|
|
35826
|
+
is_public,
|
|
35827
|
+
has_attachment,
|
|
35828
|
+
topic_id,
|
|
35786
35829
|
mentions,
|
|
35787
35830
|
references
|
|
35788
35831
|
}
|
|
@@ -35790,37 +35833,37 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35790
35833
|
return response.channel_message_ack;
|
|
35791
35834
|
});
|
|
35792
35835
|
}
|
|
35793
|
-
rpc(id, payload,
|
|
35836
|
+
rpc(id, payload, http_key) {
|
|
35794
35837
|
return __async(this, null, function* () {
|
|
35795
35838
|
const response = yield this.send({
|
|
35796
35839
|
rpc: {
|
|
35797
35840
|
id,
|
|
35798
35841
|
payload,
|
|
35799
|
-
http_key
|
|
35842
|
+
http_key
|
|
35800
35843
|
}
|
|
35801
35844
|
});
|
|
35802
35845
|
return response.rpc;
|
|
35803
35846
|
});
|
|
35804
35847
|
}
|
|
35805
|
-
unfollowUsers(
|
|
35806
|
-
return this.send({ status_unfollow: { user_ids
|
|
35848
|
+
unfollowUsers(user_ids) {
|
|
35849
|
+
return this.send({ status_unfollow: { user_ids } });
|
|
35807
35850
|
}
|
|
35808
|
-
updateChatMessage(
|
|
35851
|
+
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hide_editted, topic_id, is_update_msg_topic, old_mentions) {
|
|
35809
35852
|
return __async(this, null, function* () {
|
|
35810
35853
|
const response = yield this.send({
|
|
35811
35854
|
channel_message_update: {
|
|
35812
|
-
clan_id
|
|
35813
|
-
channel_id
|
|
35814
|
-
message_id
|
|
35855
|
+
clan_id,
|
|
35856
|
+
channel_id,
|
|
35857
|
+
message_id,
|
|
35815
35858
|
content,
|
|
35816
35859
|
mentions,
|
|
35817
35860
|
attachments,
|
|
35818
35861
|
mode,
|
|
35819
|
-
is_public
|
|
35820
|
-
hide_editted
|
|
35821
|
-
topic_id
|
|
35822
|
-
is_update_msg_topic
|
|
35823
|
-
old_mentions
|
|
35862
|
+
is_public,
|
|
35863
|
+
hide_editted,
|
|
35864
|
+
topic_id,
|
|
35865
|
+
is_update_msg_topic,
|
|
35866
|
+
old_mentions
|
|
35824
35867
|
}
|
|
35825
35868
|
});
|
|
35826
35869
|
return response.channel_message_ack;
|
|
@@ -35829,50 +35872,50 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35829
35872
|
updateStatus(status) {
|
|
35830
35873
|
return this.send({ status_update: { status } });
|
|
35831
35874
|
}
|
|
35832
|
-
writeQuickMenuEvent(
|
|
35875
|
+
writeQuickMenuEvent(menu_name, clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code, topic_id) {
|
|
35833
35876
|
return __async(this, null, function* () {
|
|
35834
35877
|
const response = yield this.send({
|
|
35835
35878
|
quick_menu_event: {
|
|
35836
|
-
|
|
35879
|
+
menu_name,
|
|
35837
35880
|
message: {
|
|
35838
|
-
clan_id
|
|
35839
|
-
channel_id
|
|
35881
|
+
clan_id,
|
|
35882
|
+
channel_id,
|
|
35840
35883
|
mode,
|
|
35841
|
-
is_public
|
|
35884
|
+
is_public,
|
|
35842
35885
|
content,
|
|
35843
35886
|
mentions,
|
|
35844
35887
|
attachments,
|
|
35845
35888
|
references,
|
|
35846
|
-
anonymous_message
|
|
35847
|
-
mention_everyone
|
|
35889
|
+
anonymous_message,
|
|
35890
|
+
mention_everyone,
|
|
35848
35891
|
avatar,
|
|
35849
35892
|
code,
|
|
35850
|
-
topic_id
|
|
35893
|
+
topic_id
|
|
35851
35894
|
}
|
|
35852
35895
|
}
|
|
35853
35896
|
});
|
|
35854
|
-
return response.
|
|
35897
|
+
return response.ephemeral_message_send;
|
|
35855
35898
|
});
|
|
35856
35899
|
}
|
|
35857
|
-
writeEphemeralMessage(
|
|
35900
|
+
writeEphemeralMessage(receiver_id, clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code, topic_id, id) {
|
|
35858
35901
|
return __async(this, null, function* () {
|
|
35859
35902
|
const response = yield this.send({
|
|
35860
35903
|
ephemeral_message_send: {
|
|
35861
|
-
receiver_id
|
|
35904
|
+
receiver_id,
|
|
35862
35905
|
message: {
|
|
35863
|
-
clan_id
|
|
35864
|
-
channel_id
|
|
35906
|
+
clan_id,
|
|
35907
|
+
channel_id,
|
|
35865
35908
|
mode,
|
|
35866
|
-
is_public
|
|
35909
|
+
is_public,
|
|
35867
35910
|
content,
|
|
35868
35911
|
mentions,
|
|
35869
35912
|
attachments,
|
|
35870
35913
|
references,
|
|
35871
|
-
anonymous_message
|
|
35872
|
-
mention_everyone
|
|
35914
|
+
anonymous_message,
|
|
35915
|
+
mention_everyone,
|
|
35873
35916
|
avatar,
|
|
35874
35917
|
code,
|
|
35875
|
-
topic_id
|
|
35918
|
+
topic_id,
|
|
35876
35919
|
id
|
|
35877
35920
|
}
|
|
35878
35921
|
}
|
|
@@ -35880,24 +35923,24 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35880
35923
|
return response.ephemeral_message_send;
|
|
35881
35924
|
});
|
|
35882
35925
|
}
|
|
35883
|
-
writeChatMessage(
|
|
35926
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code, topic_id) {
|
|
35884
35927
|
return __async(this, null, function* () {
|
|
35885
35928
|
const response = yield this.send(
|
|
35886
35929
|
{
|
|
35887
35930
|
channel_message_send: {
|
|
35888
|
-
clan_id
|
|
35889
|
-
channel_id
|
|
35931
|
+
clan_id,
|
|
35932
|
+
channel_id,
|
|
35890
35933
|
mode,
|
|
35891
|
-
is_public
|
|
35934
|
+
is_public,
|
|
35892
35935
|
content,
|
|
35893
35936
|
mentions,
|
|
35894
35937
|
attachments,
|
|
35895
35938
|
references,
|
|
35896
|
-
anonymous_message
|
|
35897
|
-
mention_everyone
|
|
35939
|
+
anonymous_message,
|
|
35940
|
+
mention_everyone,
|
|
35898
35941
|
avatar,
|
|
35899
35942
|
code,
|
|
35900
|
-
topic_id
|
|
35943
|
+
topic_id
|
|
35901
35944
|
}
|
|
35902
35945
|
},
|
|
35903
35946
|
Infinity
|
|
@@ -35905,192 +35948,192 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
35905
35948
|
return response.channel_message_ack;
|
|
35906
35949
|
});
|
|
35907
35950
|
}
|
|
35908
|
-
writeMessageReaction(id,
|
|
35951
|
+
writeMessageReaction(id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete, topic_id, emoji_recent_id, sender_name) {
|
|
35909
35952
|
return __async(this, null, function* () {
|
|
35910
35953
|
const response = yield this.send({
|
|
35911
35954
|
message_reaction_event: {
|
|
35912
35955
|
id,
|
|
35913
|
-
clan_id
|
|
35914
|
-
channel_id
|
|
35956
|
+
clan_id,
|
|
35957
|
+
channel_id,
|
|
35915
35958
|
mode,
|
|
35916
|
-
is_public
|
|
35917
|
-
message_id
|
|
35918
|
-
emoji_id
|
|
35959
|
+
is_public,
|
|
35960
|
+
message_id,
|
|
35961
|
+
emoji_id,
|
|
35919
35962
|
emoji,
|
|
35920
35963
|
count,
|
|
35921
|
-
message_sender_id
|
|
35964
|
+
message_sender_id,
|
|
35922
35965
|
action: action_delete,
|
|
35923
|
-
topic_id
|
|
35924
|
-
emoji_recent_id
|
|
35925
|
-
sender_name
|
|
35966
|
+
topic_id,
|
|
35967
|
+
emoji_recent_id,
|
|
35968
|
+
sender_name
|
|
35926
35969
|
}
|
|
35927
35970
|
});
|
|
35928
35971
|
return response.message_reaction_event;
|
|
35929
35972
|
});
|
|
35930
35973
|
}
|
|
35931
|
-
writeMessageTyping(
|
|
35974
|
+
writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name, topic_id) {
|
|
35932
35975
|
return __async(this, null, function* () {
|
|
35933
35976
|
const response = yield this.send({
|
|
35934
35977
|
message_typing_event: {
|
|
35935
|
-
clan_id
|
|
35936
|
-
channel_id
|
|
35978
|
+
clan_id,
|
|
35979
|
+
channel_id,
|
|
35937
35980
|
mode,
|
|
35938
|
-
is_public
|
|
35939
|
-
sender_display_name
|
|
35940
|
-
topic_id
|
|
35981
|
+
is_public,
|
|
35982
|
+
sender_display_name,
|
|
35983
|
+
topic_id
|
|
35941
35984
|
}
|
|
35942
35985
|
});
|
|
35943
35986
|
return response.message_typing_event;
|
|
35944
35987
|
});
|
|
35945
35988
|
}
|
|
35946
|
-
writeLastSeenMessage(
|
|
35989
|
+
writeLastSeenMessage(clan_id, channel_id, mode, message_id, timestamp_seconds, badge_count) {
|
|
35947
35990
|
return __async(this, null, function* () {
|
|
35948
35991
|
const response = yield this.send({
|
|
35949
35992
|
last_seen_message_event: {
|
|
35950
|
-
clan_id
|
|
35951
|
-
channel_id
|
|
35993
|
+
clan_id,
|
|
35994
|
+
channel_id,
|
|
35952
35995
|
mode,
|
|
35953
|
-
message_id
|
|
35954
|
-
timestamp_seconds
|
|
35955
|
-
badge_count
|
|
35996
|
+
message_id,
|
|
35997
|
+
timestamp_seconds,
|
|
35998
|
+
badge_count
|
|
35956
35999
|
}
|
|
35957
36000
|
});
|
|
35958
36001
|
return response.last_seen_message_event;
|
|
35959
36002
|
});
|
|
35960
36003
|
}
|
|
35961
|
-
writeLastPinMessage(
|
|
36004
|
+
writeLastPinMessage(clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation, message_sender_avatar, message_sender_id, message_sender_username, message_content, message_attachment, message_created_time) {
|
|
35962
36005
|
return __async(this, null, function* () {
|
|
35963
36006
|
const response = yield this.send({
|
|
35964
36007
|
last_pin_message_event: {
|
|
35965
|
-
clan_id
|
|
35966
|
-
channel_id
|
|
36008
|
+
clan_id,
|
|
36009
|
+
channel_id,
|
|
35967
36010
|
mode,
|
|
35968
|
-
is_public
|
|
35969
|
-
message_id
|
|
35970
|
-
timestamp_seconds
|
|
36011
|
+
is_public,
|
|
36012
|
+
message_id,
|
|
36013
|
+
timestamp_seconds,
|
|
35971
36014
|
operation,
|
|
35972
|
-
message_sender_avatar
|
|
35973
|
-
message_sender_id
|
|
35974
|
-
message_sender_username
|
|
35975
|
-
message_content
|
|
35976
|
-
message_attachment
|
|
35977
|
-
message_created_time
|
|
36015
|
+
message_sender_avatar,
|
|
36016
|
+
message_sender_id,
|
|
36017
|
+
message_sender_username,
|
|
36018
|
+
message_content,
|
|
36019
|
+
message_attachment,
|
|
36020
|
+
message_created_time
|
|
35978
36021
|
}
|
|
35979
36022
|
});
|
|
35980
36023
|
return response.last_pin_message_event;
|
|
35981
36024
|
});
|
|
35982
36025
|
}
|
|
35983
|
-
writeCustomStatus(
|
|
36026
|
+
writeCustomStatus(clan_id, status, time_reset, no_clear) {
|
|
35984
36027
|
return __async(this, null, function* () {
|
|
35985
36028
|
const response = yield this.send({
|
|
35986
36029
|
custom_status_event: {
|
|
35987
|
-
clan_id
|
|
36030
|
+
clan_id,
|
|
35988
36031
|
status,
|
|
35989
|
-
time_reset
|
|
35990
|
-
no_clear
|
|
36032
|
+
time_reset,
|
|
36033
|
+
no_clear
|
|
35991
36034
|
}
|
|
35992
36035
|
});
|
|
35993
36036
|
return response.custom_status_event;
|
|
35994
36037
|
});
|
|
35995
36038
|
}
|
|
35996
|
-
writeActiveArchivedThread(
|
|
36039
|
+
writeActiveArchivedThread(clan_id, channel_id) {
|
|
35997
36040
|
return __async(this, null, function* () {
|
|
35998
36041
|
const response = yield this.send({
|
|
35999
36042
|
active_archived_thread: {
|
|
36000
|
-
clan_id
|
|
36001
|
-
channel_id
|
|
36043
|
+
clan_id,
|
|
36044
|
+
channel_id
|
|
36002
36045
|
}
|
|
36003
36046
|
});
|
|
36004
36047
|
return response.active_archived_thread;
|
|
36005
36048
|
});
|
|
36006
36049
|
}
|
|
36007
|
-
checkDuplicateName(name, condition_id, type,
|
|
36050
|
+
checkDuplicateName(name, condition_id, type, clan_id) {
|
|
36008
36051
|
return __async(this, null, function* () {
|
|
36009
36052
|
const response = yield this.send({
|
|
36010
36053
|
check_name_existed_event: {
|
|
36011
36054
|
name,
|
|
36012
36055
|
condition_id,
|
|
36013
36056
|
type,
|
|
36014
|
-
clan_id
|
|
36057
|
+
clan_id
|
|
36015
36058
|
}
|
|
36016
36059
|
});
|
|
36017
36060
|
return response.check_name_existed_event;
|
|
36018
36061
|
});
|
|
36019
36062
|
}
|
|
36020
|
-
writeVoiceReaction(emojis,
|
|
36063
|
+
writeVoiceReaction(emojis, channel_id) {
|
|
36021
36064
|
return __async(this, null, function* () {
|
|
36022
36065
|
const response = yield this.send({
|
|
36023
36066
|
voice_reaction_send: {
|
|
36024
36067
|
emojis,
|
|
36025
|
-
channel_id
|
|
36068
|
+
channel_id
|
|
36026
36069
|
}
|
|
36027
36070
|
});
|
|
36028
36071
|
return response.voice_reaction_send;
|
|
36029
36072
|
});
|
|
36030
36073
|
}
|
|
36031
|
-
forwardWebrtcSignaling(
|
|
36074
|
+
forwardWebrtcSignaling(receiver_id, data_type, json_data, channel_id, caller_id) {
|
|
36032
36075
|
return __async(this, null, function* () {
|
|
36033
36076
|
const response = yield this.send({
|
|
36034
36077
|
webrtc_signaling_fwd: {
|
|
36035
|
-
receiver_id
|
|
36036
|
-
data_type
|
|
36037
|
-
json_data
|
|
36038
|
-
channel_id
|
|
36039
|
-
caller_id
|
|
36078
|
+
receiver_id,
|
|
36079
|
+
data_type,
|
|
36080
|
+
json_data,
|
|
36081
|
+
channel_id,
|
|
36082
|
+
caller_id
|
|
36040
36083
|
}
|
|
36041
36084
|
});
|
|
36042
36085
|
return response.webrtc_signaling_fwd;
|
|
36043
36086
|
});
|
|
36044
36087
|
}
|
|
36045
|
-
makeCallPush(
|
|
36088
|
+
makeCallPush(receiver_id, json_data, channel_id, caller_id) {
|
|
36046
36089
|
return __async(this, null, function* () {
|
|
36047
36090
|
const response = yield this.send({
|
|
36048
36091
|
incoming_call_push: {
|
|
36049
|
-
receiver_id
|
|
36050
|
-
json_data
|
|
36051
|
-
channel_id
|
|
36052
|
-
caller_id
|
|
36092
|
+
receiver_id,
|
|
36093
|
+
json_data,
|
|
36094
|
+
channel_id,
|
|
36095
|
+
caller_id
|
|
36053
36096
|
}
|
|
36054
36097
|
});
|
|
36055
36098
|
return response.incoming_call_push;
|
|
36056
36099
|
});
|
|
36057
36100
|
}
|
|
36058
|
-
handleDropdownBoxSelected(
|
|
36101
|
+
handleDropdownBoxSelected(message_id, channel_id, selectbox_id, sender_id, user_id, value) {
|
|
36059
36102
|
return __async(this, null, function* () {
|
|
36060
36103
|
const response = yield this.send({
|
|
36061
36104
|
dropdown_box_selected: {
|
|
36062
|
-
message_id
|
|
36063
|
-
channel_id
|
|
36064
|
-
selectbox_id
|
|
36065
|
-
sender_id
|
|
36066
|
-
user_id
|
|
36105
|
+
message_id,
|
|
36106
|
+
channel_id,
|
|
36107
|
+
selectbox_id,
|
|
36108
|
+
sender_id,
|
|
36109
|
+
user_id,
|
|
36067
36110
|
value
|
|
36068
36111
|
}
|
|
36069
36112
|
});
|
|
36070
36113
|
return response.dropdown_box_selected;
|
|
36071
36114
|
});
|
|
36072
36115
|
}
|
|
36073
|
-
handleMessageButtonClick(
|
|
36116
|
+
handleMessageButtonClick(message_id, channel_id, button_id, sender_id, user_id, extra_data) {
|
|
36074
36117
|
return __async(this, null, function* () {
|
|
36075
36118
|
const response = yield this.send({
|
|
36076
36119
|
message_button_clicked: {
|
|
36077
|
-
message_id
|
|
36078
|
-
channel_id
|
|
36079
|
-
button_id
|
|
36080
|
-
sender_id
|
|
36081
|
-
user_id
|
|
36082
|
-
extra_data
|
|
36120
|
+
message_id,
|
|
36121
|
+
channel_id,
|
|
36122
|
+
button_id,
|
|
36123
|
+
sender_id,
|
|
36124
|
+
user_id,
|
|
36125
|
+
extra_data
|
|
36083
36126
|
}
|
|
36084
36127
|
});
|
|
36085
36128
|
return response.webrtc_signaling_fwd;
|
|
36086
36129
|
});
|
|
36087
36130
|
}
|
|
36088
|
-
writeChannelAppEvent(
|
|
36131
|
+
writeChannelAppEvent(clan_id, channel_id, action) {
|
|
36089
36132
|
return __async(this, null, function* () {
|
|
36090
36133
|
const response = yield this.send({
|
|
36091
36134
|
channel_app_event: {
|
|
36092
|
-
clan_id
|
|
36093
|
-
channel_id
|
|
36135
|
+
clan_id,
|
|
36136
|
+
channel_id,
|
|
36094
36137
|
action
|
|
36095
36138
|
}
|
|
36096
36139
|
});
|