@andrey4emk/npm-app-back-b24 0.5.29 → 0.5.31
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 +7 -2
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,9 +128,14 @@ export class Wappi {
|
|
|
128
128
|
});
|
|
129
129
|
let data = await res.json();
|
|
130
130
|
if (data.status != "done") {
|
|
131
|
-
return { error: true, message: `Ошибка
|
|
131
|
+
return { error: true, message: `Ошибка проверки номера ${phone} ${messangerType}`, data: data };
|
|
132
132
|
} else {
|
|
133
|
-
|
|
133
|
+
// Проверяем нашли max или нет
|
|
134
|
+
let check = false;
|
|
135
|
+
if (data.detail === "found" || data.on_max) {
|
|
136
|
+
check = true;
|
|
137
|
+
}
|
|
138
|
+
return { error: true, message: `Номер ${phone} проверен для мессенджера ${messangerType}`, data: data, check: check };
|
|
134
139
|
}
|
|
135
140
|
}
|
|
136
141
|
}
|