@open-wa/wa-automate 4.71.13 → 4.71.14

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.
Files changed (2) hide show
  1. package/dist/api/Client.js +9 -20
  2. package/package.json +1 -1
@@ -287,7 +287,6 @@ class Client {
287
287
  this._sessionInfo = sessionInfo;
288
288
  this._sessionInfo.INSTANCE_ID = (0, uuid_1.v4)();
289
289
  this._listeners = {};
290
- // if(this._createConfig.stickerServerEndpoint!== false) this._createConfig.stickerServerEndpoint = true;
291
290
  this._setOnClose();
292
291
  }
293
292
  /**
@@ -3276,11 +3275,9 @@ class Client {
3276
3275
  const mimeInfo = (0, tools_1.base64MimeType)(image);
3277
3276
  if (!mimeInfo || mimeInfo.includes("image")) {
3278
3277
  let imgData;
3279
- if (this._createConfig.stickerServerEndpoint) {
3280
- imgData = yield this.stickerServerRequest('convertGroupIcon', {
3281
- image
3282
- });
3283
- }
3278
+ imgData = yield this.stickerServerRequest('convertGroupIcon', {
3279
+ image
3280
+ });
3284
3281
  return yield this.pup(({ groupId, imgData }) => WAPI.setGroupIcon(groupId, imgData), { groupId, imgData });
3285
3282
  }
3286
3283
  });
@@ -3596,7 +3593,7 @@ class Client {
3596
3593
  stickerServerRequest(func, a = {}, fallback = false) {
3597
3594
  var _a, _b, _c, _d;
3598
3595
  return __awaiter(this, void 0, void 0, function* () {
3599
- const stickerUrl = this._createConfig.stickerServerEndpoint || (fallback ? pkg.stickerUrl : "https://sticker-api.openwa.dev");
3596
+ const stickerUrl = this._createConfig.stickerServerEndpoint || (fallback ? pkg.stickerUrl : "https://sticker-api.openwa.dev") || "https://sticker-api.openwa.dev";
3600
3597
  if (func === 'convertMp4BufferToWebpDataUrl')
3601
3598
  fallback = true;
3602
3599
  const sessionInfo = this.getSessionInfo();
@@ -3654,15 +3651,10 @@ class Client {
3654
3651
  console.error("Not an image. Please use convertMp4BufferToWebpDataUrl to process video stickers");
3655
3652
  return false;
3656
3653
  }
3657
- // if(this._createConfig.stickerServerEndpoint) {
3658
3654
  return yield this.stickerServerRequest('prepareWebp', {
3659
3655
  image,
3660
3656
  stickerMetadata
3661
3657
  });
3662
- // } else {
3663
- // log.error("config.stickerServerEndpoint is missing")
3664
- // return false
3665
- // }
3666
3658
  });
3667
3659
  }
3668
3660
  /**
@@ -3729,14 +3721,11 @@ class Client {
3729
3721
  }
3730
3722
  }
3731
3723
  }
3732
- let convertedStickerDataUrl;
3733
- if (this._createConfig.stickerServerEndpoint) {
3734
- convertedStickerDataUrl = yield this.stickerServerRequest('convertMp4BufferToWebpDataUrl', {
3735
- file,
3736
- processOptions,
3737
- stickerMetadata
3738
- });
3739
- }
3724
+ const convertedStickerDataUrl = yield this.stickerServerRequest('convertMp4BufferToWebpDataUrl', {
3725
+ file,
3726
+ processOptions,
3727
+ stickerMetadata
3728
+ });
3740
3729
  try {
3741
3730
  if (!convertedStickerDataUrl)
3742
3731
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.71.13",
3
+ "version": "4.71.14",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",