summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Telegram/src/proto.cpp7
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;
}