mezon-js 2.12.53 → 2.12.55

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/api.gen.ts CHANGED
@@ -10911,7 +10911,7 @@ export class MezonApi {
10911
10911
  const urlPath = "/v2/quickmenuaccess";
10912
10912
  const queryParams = new Map<string, any>();
10913
10913
  queryParams.set("id", id);
10914
- queryParams.set("id", botId);
10914
+ queryParams.set("bot_id", botId);
10915
10915
  queryParams.set("menu_name", menuName);
10916
10916
  queryParams.set("background", background);
10917
10917
  queryParams.set("action_msg", actionMsg);
@@ -6666,7 +6666,7 @@ var MezonApi = class {
6666
6666
  const urlPath = "/v2/quickmenuaccess";
6667
6667
  const queryParams = /* @__PURE__ */ new Map();
6668
6668
  queryParams.set("id", id);
6669
- queryParams.set("id", botId);
6669
+ queryParams.set("bot_id", botId);
6670
6670
  queryParams.set("menu_name", menuName);
6671
6671
  queryParams.set("background", background);
6672
6672
  queryParams.set("action_msg", actionMsg);
@@ -6846,10 +6846,10 @@ var Session = class _Session {
6846
6846
  this.update(token, refresh_token, is_remember);
6847
6847
  }
6848
6848
  isexpired(currenttime) {
6849
- return this.expires_at - currenttime < 0;
6849
+ return this.expires_at - currenttime <= 0;
6850
6850
  }
6851
6851
  isrefreshexpired(currenttime) {
6852
- return this.refresh_expires_at - currenttime < 0;
6852
+ return this.refresh_expires_at - currenttime <= 0;
6853
6853
  }
6854
6854
  update(token, refreshToken, isRemember) {
6855
6855
  const tokenParts = token.split(".");
@@ -6632,7 +6632,7 @@ var MezonApi = class {
6632
6632
  const urlPath = "/v2/quickmenuaccess";
6633
6633
  const queryParams = /* @__PURE__ */ new Map();
6634
6634
  queryParams.set("id", id);
6635
- queryParams.set("id", botId);
6635
+ queryParams.set("bot_id", botId);
6636
6636
  queryParams.set("menu_name", menuName);
6637
6637
  queryParams.set("background", background);
6638
6638
  queryParams.set("action_msg", actionMsg);
@@ -6812,10 +6812,10 @@ var Session = class _Session {
6812
6812
  this.update(token, refresh_token, is_remember);
6813
6813
  }
6814
6814
  isexpired(currenttime) {
6815
- return this.expires_at - currenttime < 0;
6815
+ return this.expires_at - currenttime <= 0;
6816
6816
  }
6817
6817
  isrefreshexpired(currenttime) {
6818
- return this.refresh_expires_at - currenttime < 0;
6818
+ return this.refresh_expires_at - currenttime <= 0;
6819
6819
  }
6820
6820
  update(token, refreshToken, isRemember) {
6821
6821
  const tokenParts = token.split(".");
package/dist/socket.d.ts CHANGED
@@ -323,6 +323,8 @@ interface ChannelMessageRemove {
323
323
  /** attachments */
324
324
  has_attachment?: boolean;
325
325
  topic_id?: string;
326
+ mentions: string;
327
+ references: string;
326
328
  };
327
329
  }
328
330
  /** Presence update for a particular realtime chat channel. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.12.53",
3
+ "version": "2.12.55",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/session.ts CHANGED
@@ -72,11 +72,11 @@ export class Session implements ISession {
72
72
  }
73
73
 
74
74
  isexpired(currenttime: number): boolean {
75
- return (this.expires_at! - currenttime) < 0;
75
+ return (this.expires_at! - currenttime) <= 0;
76
76
  }
77
77
 
78
78
  isrefreshexpired(currenttime: number): boolean {
79
- return (this.refresh_expires_at! - currenttime) < 0;
79
+ return (this.refresh_expires_at! - currenttime) <= 0;
80
80
  }
81
81
 
82
82
  update(token: string, refreshToken: string, isRemember: boolean) {
package/socket.ts CHANGED
@@ -500,6 +500,10 @@ interface ChannelMessageRemove {
500
500
  has_attachment?: boolean;
501
501
  //
502
502
  topic_id?: string;
503
+ // mentions
504
+ mentions: string;
505
+ // references
506
+ references: string;
503
507
  };
504
508
  }
505
509