mezon-js 2.10.29 → 2.10.31

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.
@@ -7697,6 +7697,14 @@ var _DefaultSocket = class _DefaultSocket {
7697
7697
  return response.clan_join;
7698
7698
  });
7699
7699
  }
7700
+ follower() {
7701
+ return __async(this, null, function* () {
7702
+ const response = yield this.send({
7703
+ follow_event: {}
7704
+ });
7705
+ return response.follow_event;
7706
+ });
7707
+ }
7700
7708
  joinChat(clan_id, channel_id, channel_type, is_public) {
7701
7709
  return __async(this, null, function* () {
7702
7710
  const response = yield this.send({
@@ -7981,7 +7989,7 @@ var _DefaultSocket = class _DefaultSocket {
7981
7989
  talk_ptt_channel: {
7982
7990
  clan_id: clanId,
7983
7991
  channel_id: channelId,
7984
- isTalk
7992
+ is_talk: isTalk
7985
7993
  }
7986
7994
  });
7987
7995
  return response.talk_ptt_channel;
@@ -7663,6 +7663,14 @@ var _DefaultSocket = class _DefaultSocket {
7663
7663
  return response.clan_join;
7664
7664
  });
7665
7665
  }
7666
+ follower() {
7667
+ return __async(this, null, function* () {
7668
+ const response = yield this.send({
7669
+ follow_event: {}
7670
+ });
7671
+ return response.follow_event;
7672
+ });
7673
+ }
7666
7674
  joinChat(clan_id, channel_id, channel_type, is_public) {
7667
7675
  return __async(this, null, function* () {
7668
7676
  const response = yield this.send({
@@ -7947,7 +7955,7 @@ var _DefaultSocket = class _DefaultSocket {
7947
7955
  talk_ptt_channel: {
7948
7956
  clan_id: clanId,
7949
7957
  channel_id: channelId,
7950
- isTalk
7958
+ is_talk: isTalk
7951
7959
  }
7952
7960
  });
7953
7961
  return response.talk_ptt_channel;
package/dist/socket.d.ts CHANGED
@@ -688,6 +688,7 @@ export interface Socket {
688
688
  followUsers(user_ids: string[]): Promise<Status>;
689
689
  /** Join clan chat */
690
690
  joinClanChat(clan_id: string): Promise<ClanJoin>;
691
+ follower(): Promise<void>;
691
692
  /** Join a chat channel on the server. */
692
693
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
693
694
  /** Leave a chat channel on the server. */
@@ -889,6 +890,7 @@ export declare class DefaultSocket implements Socket {
889
890
  send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping | WebrtcSignalingFwd | IncomingCallPush | MessageButtonClicked | DropdownBoxSelected | JoinPTTChannel | TalkPTTChannel, sendTimeout?: number): Promise<any>;
890
891
  followUsers(userIds: string[]): Promise<Status>;
891
892
  joinClanChat(clan_id: string): Promise<ClanJoin>;
893
+ follower(): Promise<void>;
892
894
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
893
895
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
894
896
  removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.29",
4
+ "version": "2.10.31",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -961,6 +961,8 @@ export interface Socket {
961
961
  /** Join clan chat */
962
962
  joinClanChat(clan_id: string): Promise<ClanJoin>;
963
963
 
964
+ follower(): Promise<void>;
965
+
964
966
  /** Join a chat channel on the server. */
965
967
  joinChat(
966
968
  clan_id: string,
@@ -2028,6 +2030,14 @@ export class DefaultSocket implements Socket {
2028
2030
  return response.clan_join;
2029
2031
  }
2030
2032
 
2033
+ async follower(): Promise<void> {
2034
+ const response = await this.send({
2035
+ follow_event: {},
2036
+ });
2037
+
2038
+ return response.follow_event;
2039
+ }
2040
+
2031
2041
  async joinChat(
2032
2042
  clan_id: string,
2033
2043
  channel_id: string,
@@ -2425,7 +2435,7 @@ export class DefaultSocket implements Socket {
2425
2435
  talk_ptt_channel: {
2426
2436
  clan_id: clanId,
2427
2437
  channel_id: channelId,
2428
- isTalk: isTalk,
2438
+ is_talk: isTalk,
2429
2439
  },
2430
2440
  });
2431
2441
  return response.talk_ptt_channel;