diff options
author | George Hazan <george.hazan@gmail.com> | 2024-10-18 19:04:38 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-10-18 19:04:38 +0300 |
commit | e836a46e4e0d1e9bddd4cd46b672ce17fcfd579f (patch) | |
tree | 93e1e4be21d1bbbeb2122add050f368c838d8bc4 | |
parent | 63e7528ad06d3a12f8f46f89b8124e6b347d3074 (diff) |
fixes #4645 (Telegram: невозможно скорректировать ошибочно введённый номер телефона)
-rw-r--r-- | protocols/Telegram/src/server.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index 1f5c204abe..0bce32d512 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -27,6 +27,7 @@ void __cdecl CTelegramProto::ServerThread(void *) {
m_botIds.clear();
+ bool bWasAuthorized = getBool(DBKEY_AUTHORIZED);
m_bTerminated = m_bAuthorized = false;
m_pClientManager = std::make_unique<td::ClientManager>();
m_iClientId = m_pClientManager->create_client_id();
@@ -52,11 +53,13 @@ void __cdecl CTelegramProto::ServerThread(void *) SendQuery(new TD::addProxy(nluSettings.szProxyServer, nluSettings.wProxyPort, true, std::move(proxyType)));
}
- while (!m_bTerminated) {
+ while (!m_bTerminated)
ProcessResponse(m_pClientManager->receive(1));
- }
m_pClientManager = std::move(nullptr);
+
+ if (!bWasAuthorized && !getBool(DBKEY_AUTHORIZED))
+ OnErase();
}
void CTelegramProto::UnregisterSession()
|