@lazyneoaz/metachat 6.0.8 → 6.0.9

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/index.cjs CHANGED
@@ -88499,6 +88499,8 @@ function gcrule_default(defaultFuncs, api, ctx) {
88499
88499
  resolvePromise = resolve;
88500
88500
  rejectPromise = reject;
88501
88501
  });
88502
+ returnPromise.catch(() => {
88503
+ });
88502
88504
  if (typeof _callback != "function") {
88503
88505
  _callback = (err, data2) => {
88504
88506
  if (err) return rejectPromise(err);
@@ -89815,11 +89817,22 @@ function theme_default(defaultFuncs, api, ctx) {
89815
89817
  _callback = void 0;
89816
89818
  _initiatorID = void 0;
89817
89819
  }
89820
+ finalReturnPromise.catch(() => {
89821
+ });
89818
89822
  if (!_callback) {
89819
89823
  _callback = function(_err, _data) {
89820
89824
  if (_err) _rejectFunc(_err);
89821
89825
  else _resolveFunc(_data);
89822
89826
  };
89827
+ } else {
89828
+ const originalCallback = _callback;
89829
+ _callback = function(_err, _data) {
89830
+ try {
89831
+ originalCallback(_err, _data);
89832
+ } finally {
89833
+ _resolveFunc(_data);
89834
+ }
89835
+ };
89823
89836
  }
89824
89837
  _initiatorID = _initiatorID || ctx.userID;
89825
89838
  threadID = threadID || ctx.threadID;
@@ -92857,15 +92870,8 @@ function changeAdminStatus_default(defaultFuncs, _api, ctx) {
92857
92870
  requestId: content.request_id,
92858
92871
  extract: (parsed) => {
92859
92872
  const body = parsed && parsed.payload;
92860
- const error2 = body && (body.error || body.errorDescription);
92861
- if (error2) {
92862
- const err = new Error(
92863
- typeof error2 === "string" ? error2 : error2.message || "admin_status task rejected"
92864
- );
92865
- err.error = error2;
92866
- throw err;
92867
- }
92868
- return body || { success: true };
92873
+ if (!body || typeof body !== "object") return { success: true };
92874
+ return body;
92869
92875
  }
92870
92876
  });
92871
92877
  if (cb) cb(null);
package/dist/index.mjs CHANGED
@@ -88467,6 +88467,8 @@ function gcrule_default(defaultFuncs, api, ctx) {
88467
88467
  resolvePromise = resolve;
88468
88468
  rejectPromise = reject;
88469
88469
  });
88470
+ returnPromise.catch(() => {
88471
+ });
88470
88472
  if (typeof _callback != "function") {
88471
88473
  _callback = (err, data2) => {
88472
88474
  if (err) return rejectPromise(err);
@@ -89783,11 +89785,22 @@ function theme_default(defaultFuncs, api, ctx) {
89783
89785
  _callback = void 0;
89784
89786
  _initiatorID = void 0;
89785
89787
  }
89788
+ finalReturnPromise.catch(() => {
89789
+ });
89786
89790
  if (!_callback) {
89787
89791
  _callback = function(_err, _data) {
89788
89792
  if (_err) _rejectFunc(_err);
89789
89793
  else _resolveFunc(_data);
89790
89794
  };
89795
+ } else {
89796
+ const originalCallback = _callback;
89797
+ _callback = function(_err, _data) {
89798
+ try {
89799
+ originalCallback(_err, _data);
89800
+ } finally {
89801
+ _resolveFunc(_data);
89802
+ }
89803
+ };
89791
89804
  }
89792
89805
  _initiatorID = _initiatorID || ctx.userID;
89793
89806
  threadID = threadID || ctx.threadID;
@@ -92825,15 +92838,8 @@ function changeAdminStatus_default(defaultFuncs, _api, ctx) {
92825
92838
  requestId: content.request_id,
92826
92839
  extract: (parsed) => {
92827
92840
  const body = parsed && parsed.payload;
92828
- const error2 = body && (body.error || body.errorDescription);
92829
- if (error2) {
92830
- const err = new Error(
92831
- typeof error2 === "string" ? error2 : error2.message || "admin_status task rejected"
92832
- );
92833
- err.error = error2;
92834
- throw err;
92835
- }
92836
- return body || { success: true };
92841
+ if (!body || typeof body !== "object") return { success: true };
92842
+ return body;
92837
92843
  }
92838
92844
  });
92839
92845
  if (cb) cb(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazyneoaz/metachat",
3
- "version": "6.0.8",
3
+ "version": "6.0.9",
4
4
  "description": "A modern TypeScript Facebook Chat API client for building reliable Messenger bots, with built-in anti-detection protection, automatic cookie refresh, music search, and AI theme support.",
5
5
  "license": "MIT",
6
6
  "author": {