summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-03-20 17:25:07 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-03-20 17:25:07 +0300
commit0afefd8efd13f9cc88baf8baef7c445329d68091 (patch)
treef108c379b2d2d17005367fbf88f4734bc2d1ed0d /protocols/Telegram/src
parentb07063023ffb6bac667bb865e4d30212b88ff8e2 (diff)
removed code for #4925
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r--protocols/Telegram/src/proto.cpp12
-rw-r--r--protocols/Telegram/src/proto.h1
2 files changed, 0 insertions, 13 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp
index 327cc9a090..3732e1a5e5 100644
--- a/protocols/Telegram/src/proto.cpp
+++ b/protocols/Telegram/src/proto.cpp
@@ -635,11 +635,6 @@ HANDLE CTelegramProto::SendFile(MCONTACT hContact, const wchar_t *szDescription,
/////////////////////////////////////////////////////////////////////////////////////////
-void CTelegramProto::OnChatCreated(td::ClientManager::Response &response, void *pUserInfo)
-{
- SetEvent(pUserInfo);
-}
-
int CTelegramProto::SendMsg(MCONTACT hContact, MEVENT hReplyEvent, const char *pszMessage)
{
ptrA szId(getStringA(hContact, DBKEY_ID));
@@ -658,13 +653,6 @@ int CTelegramProto::SendMsg(MCONTACT hContact, MEVENT hReplyEvent, const char *p
iReplyId = dbei2id(dbei);
}
- if (pUser->chatId == -1) {
- HANDLE hEvent = ::CreateEvent(0, TRUE, FALSE, 0);
- SendQuery(new TD::createNewPrivateChat(pUser->id, false), &CTelegramProto::OnChatCreated, hEvent);
- WaitForSingleObject(hEvent, INFINITE);
- CloseHandle(hEvent);
- }
-
int msgid = SendTextMessage(pUser->chatId, 0, iReplyId, pszMessage);
if (msgid != -1)
m_arOwnMsg.insert(new TG_OWN_MESSAGE(hContact, (HANDLE)msgid, ""));
diff --git a/protocols/Telegram/src/proto.h b/protocols/Telegram/src/proto.h
index c8a607eccc..29cc8b3654 100644
--- a/protocols/Telegram/src/proto.h
+++ b/protocols/Telegram/src/proto.h
@@ -233,7 +233,6 @@ class CTelegramProto : public PROTO<CTelegramProto>
}
void OnAvatarSet(td::ClientManager::Response &response, void *pUserInfo);
- void OnChatCreated(td::ClientManager::Response &response, void *pUserInfo);
void OnEndSession(td::ClientManager::Response &response);
void OnGetFileInfo(td::ClientManager::Response &response, void *pUserInfo);
void OnGetFileLink(td::ClientManager::Response &response);