mezon-js 2.11.8 → 2.11.10

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/socket.d.ts CHANGED
@@ -387,6 +387,7 @@ export interface ClanUpdatedEvent {
387
387
  status: number;
388
388
  is_onboarding: boolean;
389
389
  welcome_channel_id: string;
390
+ onboarding_banner: string;
390
391
  }
391
392
  export interface ClanProfileUpdatedEvent {
392
393
  user_id: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.11.8",
4
+ "version": "2.11.10",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -592,6 +592,8 @@ export interface ClanUpdatedEvent {
592
592
  is_onboarding: boolean;
593
593
  // welcome channel id
594
594
  welcome_channel_id: string;
595
+ // onboarding_banner.
596
+ onboarding_banner: string;
595
597
  }
596
598
 
597
599
  export interface ClanProfileUpdatedEvent {
@@ -1527,7 +1529,7 @@ export class DefaultSocket implements Socket {
1527
1529
  } else if (message.stream_data) {
1528
1530
  this.onstreamdata(<StreamData>message.stream_data);
1529
1531
  } else if (message.channel_message) {
1530
- var content, reactions, mentions, attachments, references;
1532
+ var content, reactions, mentions, attachments, references, referencedMessags;
1531
1533
  try {
1532
1534
  content = safeJSONParse(message.channel_message.content);
1533
1535
  } catch (e) {
@@ -1553,6 +1555,11 @@ export class DefaultSocket implements Socket {
1553
1555
  } catch (e) {
1554
1556
  console.log("references is invalid", e);
1555
1557
  }
1558
+ try {
1559
+ referencedMessags = safeJSONParse(message.channel_message.referenced_message);
1560
+ } catch (e) {
1561
+ console.log("referenced messages is invalid", e);
1562
+ }
1556
1563
  var e: ChannelMessage = {
1557
1564
  id: message.id || message.channel_message.message_id,
1558
1565
  avatar: message.channel_message.avatar,
@@ -1575,6 +1582,7 @@ export class DefaultSocket implements Socket {
1575
1582
  reactions: reactions,
1576
1583
  mentions: mentions,
1577
1584
  attachments: attachments,
1585
+ referenced_message: referencedMessags,
1578
1586
  references: references,
1579
1587
  hide_editted: message.channel_message.hide_editted,
1580
1588
  is_public: message.channel_message.is_public,