@andrey4emk/npm-app-back-b24 0.5.29 → 0.5.30
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/chatApp.js +2 -1
- package/sendMessage/wappi.js +6 -1
package/package.json
CHANGED
package/sendMessage/chatApp.js
CHANGED
|
@@ -164,7 +164,8 @@ export class ChatApp {
|
|
|
164
164
|
// Сбрасываем флаг обновления токена
|
|
165
165
|
this.updateToken = false;
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
let check = data.data.exists;
|
|
168
|
+
return { error: false, message: `Телефон успешно проверен в ChatApp через ${messangerType}`, data: data, auth: newAuth, check: check };
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
|
package/sendMessage/wappi.js
CHANGED
|
@@ -128,7 +128,12 @@ export class Wappi {
|
|
|
128
128
|
});
|
|
129
129
|
let data = await res.json();
|
|
130
130
|
if (data.status != "done") {
|
|
131
|
-
|
|
131
|
+
// Проверяем нашли max или нет
|
|
132
|
+
let check = false;
|
|
133
|
+
if (data.detail === "found" || data.on_max) {
|
|
134
|
+
check = true;
|
|
135
|
+
}
|
|
136
|
+
return { error: true, message: `Номер ${phone} проверен для мессенджера ${messangerType}`, data: data, check: check };
|
|
132
137
|
} else {
|
|
133
138
|
return { error: false, message: `Сообщение успешно отправлено в ChatApp через ${messangerType}`, data: data };
|
|
134
139
|
}
|