mezon-js 2.10.30 → 2.10.32

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({
@@ -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({
package/dist/socket.d.ts CHANGED
@@ -103,6 +103,9 @@ export interface UserChannelAddedEvent {
103
103
  users: UserProfileRedis[];
104
104
  status: string;
105
105
  clan_id: string;
106
+ caller: UserProfileRedis;
107
+ create_time_second: number;
108
+ active: number;
106
109
  }
107
110
  export interface UserChannelRemovedEvent {
108
111
  channel_id: string;
@@ -688,6 +691,7 @@ export interface Socket {
688
691
  followUsers(user_ids: string[]): Promise<Status>;
689
692
  /** Join clan chat */
690
693
  joinClanChat(clan_id: string): Promise<ClanJoin>;
694
+ follower(): Promise<void>;
691
695
  /** Join a chat channel on the server. */
692
696
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
693
697
  /** Leave a chat channel on the server. */
@@ -889,6 +893,7 @@ export declare class DefaultSocket implements Socket {
889
893
  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
894
  followUsers(userIds: string[]): Promise<Status>;
891
895
  joinClanChat(clan_id: string): Promise<ClanJoin>;
896
+ follower(): Promise<void>;
892
897
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
893
898
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
894
899
  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.30",
4
+ "version": "2.10.32",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -147,6 +147,12 @@ export interface UserChannelAddedEvent {
147
147
  status: string;
148
148
  // the clan id
149
149
  clan_id: string;
150
+ //
151
+ caller: UserProfileRedis;
152
+ //
153
+ create_time_second: number;
154
+ //
155
+ active: number;
150
156
  }
151
157
 
152
158
  export interface UserChannelRemovedEvent {
@@ -961,6 +967,8 @@ export interface Socket {
961
967
  /** Join clan chat */
962
968
  joinClanChat(clan_id: string): Promise<ClanJoin>;
963
969
 
970
+ follower(): Promise<void>;
971
+
964
972
  /** Join a chat channel on the server. */
965
973
  joinChat(
966
974
  clan_id: string,
@@ -2028,6 +2036,14 @@ export class DefaultSocket implements Socket {
2028
2036
  return response.clan_join;
2029
2037
  }
2030
2038
 
2039
+ async follower(): Promise<void> {
2040
+ const response = await this.send({
2041
+ follow_event: {},
2042
+ });
2043
+
2044
+ return response.follow_event;
2045
+ }
2046
+
2031
2047
  async joinChat(
2032
2048
  clan_id: string,
2033
2049
  channel_id: string,