@andrey4emk/npm-app-back-b24 0.6.9 → 0.6.10
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 +3 -2
package/package.json
CHANGED
package/sendMessage/wappi.js
CHANGED
|
@@ -84,6 +84,7 @@ export class Wappi {
|
|
|
84
84
|
let token;
|
|
85
85
|
let profile_id;
|
|
86
86
|
let base64;
|
|
87
|
+
|
|
87
88
|
if (messangerType === "whatsApp") {
|
|
88
89
|
url = ``;
|
|
89
90
|
}
|
|
@@ -113,7 +114,7 @@ export class Wappi {
|
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
// Max при отправке pdf не прикрепляет сообщение caption: message, поэтому отправляем его отдельно
|
|
116
|
-
if (fileName.includes(".pdf")) {
|
|
117
|
+
if (fileName.includes(".pdf") && messangerType === "max") {
|
|
117
118
|
await this.sendMessageWappi(messangerType, { phone: phone, message: message });
|
|
118
119
|
}
|
|
119
120
|
console.log("base64:", base64);
|
|
@@ -126,7 +127,7 @@ export class Wappi {
|
|
|
126
127
|
|
|
127
128
|
body: JSON.stringify({
|
|
128
129
|
recipient: phone,
|
|
129
|
-
|
|
130
|
+
url: fileUrl,
|
|
130
131
|
file_name: fileName,
|
|
131
132
|
caption: message,
|
|
132
133
|
b64_file: base64,
|