summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-03 18:48:11 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-03 18:48:11 +0300
commit97aaa26b16121281291acf58c26e1032a24d85bf (patch)
tree5a08a3766ac9d046f181b80bb55a73b00b4b2c32 /protocols/Telegram/src/server.cpp
parent47b61b0cdaa95adf2543523da00f134276eff8c3 (diff)
fixes #3324 (Telegram: phone number)
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r--protocols/Telegram/src/server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index e039628284..aab8a3a49e 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -25,6 +25,7 @@ void CTelegramProto::OnEndSession(td::ClientManager::Response&)
void __cdecl CTelegramProto::ServerThread(void *)
{
m_bTerminated = m_bAuthorized = false;
+ m_szFullPhone.Format("%d%S", (int)m_iCountry, (wchar_t *)m_szOwnPhone);
m_pClientMmanager = std::make_unique<td::ClientManager>();
m_iClientId = m_pClientMmanager->create_client_id();
@@ -457,7 +458,7 @@ void CTelegramProto::ProcessUser(TD::updateUser *pObj)
{
auto *pUser = pObj->user_.get();
- if (pUser->phone_number_ == _T2A(m_szOwnPhone).get()) {
+ if (pUser->phone_number_ == m_szFullPhone.c_str()) {
m_iOwnId = pUser->id_;
if (!FindUser(pUser->id_))