mezon-js 2.8.62 → 2.8.64

Sign up to get free protection for your applications and to get access to all the features.
@@ -4673,7 +4673,7 @@ var _DefaultSocket = class _DefaultSocket {
4673
4673
  } catch (e2) {
4674
4674
  }
4675
4675
  var e = {
4676
- id: message.id,
4676
+ id: message.id || message.channel_message.message_id,
4677
4677
  avatar: message.channel_message.avatar,
4678
4678
  channel_id: message.channel_message.channel_id,
4679
4679
  mode: message.channel_message.mode,
@@ -5033,9 +5033,9 @@ var _DefaultSocket = class _DefaultSocket {
5033
5033
  return response.message_reaction_event;
5034
5034
  });
5035
5035
  }
5036
- writeMessageTyping(clan_id, channel_id, mode) {
5036
+ writeMessageTyping(clan_id, channel_id, mode, is_public) {
5037
5037
  return __async(this, null, function* () {
5038
- const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode } });
5038
+ const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode, is_public } });
5039
5039
  return response.message_typing_event;
5040
5040
  });
5041
5041
  }
@@ -4644,7 +4644,7 @@ var _DefaultSocket = class _DefaultSocket {
4644
4644
  } catch (e2) {
4645
4645
  }
4646
4646
  var e = {
4647
- id: message.id,
4647
+ id: message.id || message.channel_message.message_id,
4648
4648
  avatar: message.channel_message.avatar,
4649
4649
  channel_id: message.channel_message.channel_id,
4650
4650
  mode: message.channel_message.mode,
@@ -5004,9 +5004,9 @@ var _DefaultSocket = class _DefaultSocket {
5004
5004
  return response.message_reaction_event;
5005
5005
  });
5006
5006
  }
5007
- writeMessageTyping(clan_id, channel_id, mode) {
5007
+ writeMessageTyping(clan_id, channel_id, mode, is_public) {
5008
5008
  return __async(this, null, function* () {
5009
- const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode } });
5009
+ const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode, is_public } });
5010
5010
  return response.message_typing_event;
5011
5011
  });
5012
5012
  }
package/dist/socket.d.ts CHANGED
@@ -262,6 +262,7 @@ export interface ChannelUpdatedEvent {
262
262
  channel_type: number;
263
263
  status: number;
264
264
  meeting_code: string;
265
+ is_error: boolean;
265
266
  }
266
267
  export interface ChannelCreatedEvent {
267
268
  clan_id: string;
@@ -670,7 +671,7 @@ export declare class DefaultSocket implements Socket {
670
671
  updateStatus(status?: string): Promise<void>;
671
672
  writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string): Promise<ChannelMessageAck>;
672
673
  writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
673
- writeMessageTyping(clan_id: string, channel_id: string, mode: number): Promise<MessageTypingEvent>;
674
+ writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
674
675
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
675
676
  writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
676
677
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.62",
3
+ "version": "2.8.64",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -376,6 +376,8 @@ export interface ChannelUpdatedEvent {
376
376
  status: number;
377
377
  // meeting code
378
378
  meeting_code: string;
379
+ // is error
380
+ is_error: boolean;
379
381
  }
380
382
 
381
383
  export interface ChannelCreatedEvent {
@@ -768,7 +770,7 @@ export interface Socket {
768
770
  unfollowUsers(user_ids : string[]) : Promise<void>;
769
771
 
770
772
  /** Update a chat message on a chat channel in the server. */
771
- updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id : string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean) : Promise<ChannelMessageAck>;
773
+ updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean) : Promise<ChannelMessageAck>;
772
774
 
773
775
  /** Update the status for the current user online. */
774
776
  updateStatus(status? : string) : Promise<void>;
@@ -1040,7 +1042,7 @@ export class DefaultSocket implements Socket {
1040
1042
  //console.log("references is invalid", e);
1041
1043
  }
1042
1044
  var e: ChannelMessage = {
1043
- id: message.id,
1045
+ id: message.id || message.channel_message.message_id,
1044
1046
  avatar: message.channel_message.avatar,
1045
1047
  channel_id: message.channel_message.channel_id,
1046
1048
  mode: message.channel_message.mode,
@@ -1443,8 +1445,8 @@ export class DefaultSocket implements Socket {
1443
1445
  return response.message_reaction_event
1444
1446
  }
1445
1447
 
1446
- async writeMessageTyping(clan_id: string, channel_id: string, mode: number): Promise<MessageTypingEvent> {
1447
- const response = await this.send({message_typing_event: {clan_id: clan_id, channel_id: channel_id, mode:mode}});
1448
+ async writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent> {
1449
+ const response = await this.send({message_typing_event: {clan_id: clan_id, channel_id: channel_id, mode:mode, is_public: is_public}});
1448
1450
  return response.message_typing_event
1449
1451
  }
1450
1452