diff options
author | George Hazan <ghazan@miranda.im> | 2023-01-11 12:05:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-01-11 12:05:57 +0300 |
commit | 80879265e20ec0abd7384c20b670d9385b2e8f6a (patch) | |
tree | 4b1016695f49a351306d72ce0803ed0dca55333b /protocols/Telegram/src/server.cpp | |
parent | 9ab83c6bb239d88e54ae1ce7a8af49432543443a (diff) |
Telegram: mark read sending optimization
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r-- | protocols/Telegram/src/server.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index fbb6c53f3d..24ad055fff 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -88,6 +88,16 @@ void CMTProto::SendKeepAlive() } } +void CMTProto::SendMarkRead() +{ + m_impl.m_markRead.Stop(); + + mir_cslock lck(m_csMarkRead); + uint64_t userId = _atoi64(getMStringA(m_markContact, DBKEY_ID)); + SendQuery(new TD::viewMessages(userId, 0, std::move(m_markIds), true)); + m_markContact = 0; +} + /////////////////////////////////////////////////////////////////////////////// void CMTProto::ProcessResponse(td::ClientManager::Response response) @@ -146,6 +156,8 @@ void CMTProto::ProcessResponse(td::ClientManager::Response response) } } +///////////////////////////////////////////////////////////////////////////////////////// + void CMTProto::OnSendMessage(td::ClientManager::Response &response, void *pUserInfo) { if (!response.object) |