@andrey4emk/npm-app-back-b24 0.5.34 → 0.5.36
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/package.json +1 -1
- package/sendMessage/wappi.js +6 -1
package/package.json
CHANGED
package/sendMessage/wappi.js
CHANGED
|
@@ -80,6 +80,11 @@ export class Wappi {
|
|
|
80
80
|
if (messangerType === "max") {
|
|
81
81
|
url = `https://wappi.pro/maxapi/async/message/file/url/send`;
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
// Max при отправке pdf не прикрепляет сообщение caption: message, поэтому отправляем его отдельно
|
|
85
|
+
if (fileName.includes(".pdf")) {
|
|
86
|
+
await this.sendMessageWappi(messangerType, { phone: phone, message: message });
|
|
87
|
+
}
|
|
83
88
|
let res = await fetch(url + `?profile_id=${this.profile_id}`, {
|
|
84
89
|
method: "POST",
|
|
85
90
|
headers: {
|
|
@@ -91,7 +96,7 @@ export class Wappi {
|
|
|
91
96
|
recipient: phone,
|
|
92
97
|
url: fileUrl,
|
|
93
98
|
file_name: fileName,
|
|
94
|
-
caption:
|
|
99
|
+
caption: message,
|
|
95
100
|
}),
|
|
96
101
|
});
|
|
97
102
|
let data = await res.json();
|