diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-13 22:12:11 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-13 22:12:11 +0300 |
commit | a9c4df73c8eb70cd08c33e043405b13eab032d42 (patch) | |
tree | e92d5fcdf320c6cf6494affb4d0f335f6ed2b03b /protocols/Telegram/src/proto.cpp | |
parent | 7263dec07c44ea7a38583fc0d827e8cc942762ac (diff) |
Telegram: we handle only our own contacts
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r-- | protocols/Telegram/src/proto.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index cc386b8a11..5fe249d3b2 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -165,9 +165,10 @@ int CTelegramProto::OnWindowEvent(WPARAM wParam, LPARAM lParam) { if (wParam == MSG_WINDOW_EVT_OPENING) { auto *pDlg = (CMsgDialog *)lParam; - auto *pUser = FindUser(GetId(pDlg->m_hContact)); - if (pUser->chatId == -1 && !pDlg->isChat()) - SendQuery(new TD::createPrivateChat(pUser->id, true)); + if (Proto_IsProtoOnContact(pDlg->m_hContact, m_szModuleName)) + if (auto *pUser = FindUser(GetId(pDlg->m_hContact))) + if (pUser->chatId == -1 && !pDlg->isChat()) + SendQuery(new TD::createPrivateChat(pUser->id, true)); } return 0; } |