From 09695993c1a6fe40eb22b3caceffab8e8b71e349 Mon Sep 17 00:00:00 2001
From: George Hazan <george.hazan@gmail.com>
Date: Tue, 27 Feb 2024 16:15:53 +0300
Subject: Telegram: fix for wrong (last_message_ == null) processing

---
 protocols/Telegram/src/server.cpp | 9 ---------
 1 file changed, 9 deletions(-)

(limited to 'protocols/Telegram/src')

diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 7c4b045042..9136b4c11d 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -553,15 +553,6 @@ void CTelegramProto::ProcessChatLastMessage(TD::updateChatLastMessage *pObj)
 		debugLogA("Last message for a temporary contact, skipping");
 		return;
 	}
-
-	// according to #3406 we wipe history for the contacts from contacts' list
-	// but remove the contact itself if it's a temporary one
-	if (pObj->last_message_ == nullptr) {
-		if (Contact::OnList(pUser->hContact))
-			CallService(MS_HISTORY_EMPTY, pUser->hContact, TRUE);
-		else
-			db_delete_contact(pUser->hContact, CDF_FROM_SERVER);
-	}
 }
 
 void CTelegramProto::ProcessChatNotification(TD::updateChatNotificationSettings *pObj)
-- 
cgit v1.2.3