1.3.2-beta.4: «номер не найден» объясняет почему (нет в MAX или закрыт поиск по номеру) и что делать — попросить человека написать первым

This commit is contained in:
Folist 2026-10-11 05:22:01 +03:00
parent 9ff1c3e7a8
commit b69169aab6
3 changed files with 9 additions and 4 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "telemax",
"version": "1.3.2-beta.3",
"version": "1.3.2-beta.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "telemax",
"version": "1.3.2-beta.3",
"version": "1.3.2-beta.4",
"license": "AGPL-3.0-only",
"dependencies": {
"dotenv": "^17.2.3",

View file

@ -2,7 +2,7 @@
"name": "telemax",
"private": true,
"license": "AGPL-3.0-only",
"version": "1.3.2-beta.3",
"version": "1.3.2-beta.4",
"type": "module",
"scripts": {
"dev": "tsx watch src/server/app.ts",

View file

@ -614,7 +614,12 @@ export function wireControlPanel(deps: ControlPanelDeps): void {
const contact = await max.searchContactByPhone(phone);
logger.info(`Phone search ${maskPhone(phone)}: ${contact ? 'found' : 'not found'}`);
if (!contact) {
await bot.telegram.sendMessage(chatId, `❌ Номер ${phone} в MAX не найден.`);
// MAX answers the same «not found» when the person limited search by number in their privacy
// settings — then nobody can find them, the MAX app included; only a message from them opens the chat.
await bot.telegram.sendMessage(
chatId,
`❌ Номер ${phone} в MAX не найден. Либо его нет в MAX, либо человек ограничил поиск по номеру в настройках приватности. Тогда попросите его написать вам в MAX первым — чат сам появится здесь отдельной темой.`,
);
return;
}
await sendCard(chatId, contact);