@open-wa/wa-automate 4.65.0 → 4.65.1

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.
@@ -456,11 +456,10 @@ class ChatwootClient {
456
456
  __1.log.info(`INCOMING MESSAGE ATTACHMENT ${contactId}: ${content} ${message.id}`);
457
457
  const formData = new form_data_1.default();
458
458
  formData.append('attachments[]', Buffer.from(file.split(',')[1], 'base64'), {
459
- knownLength: 1,
460
459
  filename: `${message.t}.${mime_types_1.default.extension(message.mimetype)}`,
461
460
  contentType: (file.match(/[^:\s*]\w+\/[\w-+\d.]+(?=[;| ])/) || ["application/octet-stream"])[0]
462
461
  });
463
- formData.append('content', content);
462
+ formData.append('content', content || "");
464
463
  formData.append('message_type', 'incoming');
465
464
  try {
466
465
  const { data } = yield this.cwReq('post', `conversations/${convoReg[contactId]}/messages`, formData, formData.getHeaders());
@@ -2,7 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
4
  import { AdvancedFile, ConfigObject, DataURL } from '../api/model';
5
- import { AxiosRequestConfig, AxiosResponseHeaders } from 'axios';
5
+ import { AxiosRequestConfig } from 'axios';
6
6
  import { SessionInfo } from '../api/model/sessionInfo';
7
7
  import { Readable } from "stream";
8
8
  export declare const timeout: (ms: any) => Promise<unknown>;
@@ -39,7 +39,7 @@ export declare const isDataURL: (s: string) => boolean;
39
39
  * @param url The url
40
40
  * @param optionsOverride You can use this to override the [axios request config](https://github.com/axios/axios#request-config)
41
41
  */
42
- export declare const getBufferFromUrl: (url: string, optionsOverride?: AxiosRequestConfig) => Promise<[Buffer, AxiosResponseHeaders]>;
42
+ export declare const getBufferFromUrl: (url: string, optionsOverride?: any) => Promise<[Buffer, any]>;
43
43
  /**
44
44
  * @internal
45
45
  * A convinience method to download the [[DataURL]] of a file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.65.0",
3
+ "version": "4.65.1",
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",
@@ -110,7 +110,7 @@
110
110
  "@open-wa/wa-decrypt": "^4.3.1",
111
111
  "atob": "^2.1.2",
112
112
  "aws4": "^1.11.0",
113
- "axios": "^0.25.0",
113
+ "axios": "^1.4.0",
114
114
  "boxen": "^5.0.0",
115
115
  "cfonts": "^2.8.5",
116
116
  "change-case": "^4.1.2",