summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r--protocols/Telegram/src/proto.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp
index c7836d4e03..e112712128 100644
--- a/protocols/Telegram/src/proto.cpp
+++ b/protocols/Telegram/src/proto.cpp
@@ -169,6 +169,10 @@ void CTelegramProto::OnModulesLoaded()
void CTelegramProto::OnShutdown()
{
m_bTerminated = true;
+
+ for (auto &cc : m_arUsers)
+ if (cc->isBot && !cc->chatId && cc->hContact != INVALID_CONTACT_ID)
+ Contact::RemoveFromList(cc->hContact);
}
int CTelegramProto::OnWindowEvent(WPARAM wParam, LPARAM lParam)