summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-29 13:05:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-29 13:05:35 +0300
commit0770a12fb1d36674053771f2c559c508725090af (patch)
treec9144cce3d78dba371ed97fe99da279f373e1ecd /protocols/Telegram/src/server.cpp
parenta95b57678699388a4e40716eacd8af5931574d72 (diff)
fixes #3402 (Telegram: mark read sending doesn't work sometimes)
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r--protocols/Telegram/src/server.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 85afbae93d..1afc03c6a6 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -101,9 +101,8 @@ void CTelegramProto::SendDeleteMsg()
m_impl.m_deleteMsg.Stop();
mir_cslock lck(m_csDeleteMsg);
- int64_t userId = _atoi64(getMStringA(m_deleteMsgContact, DBKEY_ID));
- SendQuery(new TD::deleteMessages(userId, std::move(m_deleteIds), true));
- m_markContact = 0;
+ SendQuery(new TD::deleteMessages(m_deleteChatId, std::move(m_deleteIds), true));
+ m_deleteChatId = 0;
}
void CTelegramProto::SendMarkRead()
@@ -111,9 +110,8 @@ void CTelegramProto::SendMarkRead()
m_impl.m_markRead.Stop();
mir_cslock lck(m_csMarkRead);
- int64_t userId = _atoi64(getMStringA(m_markContact, DBKEY_ID));
- SendQuery(new TD::viewMessages(userId, 0, std::move(m_markIds), true));
- m_markContact = 0;
+ SendQuery(new TD::viewMessages(m_markChatId, 0, std::move(m_markIds), true));
+ m_markChatId = 0;
}
///////////////////////////////////////////////////////////////////////////////
@@ -273,8 +271,11 @@ void CTelegramProto::ProcessBasicGroup(TD::updateBasicGroup *pObj)
{
auto *pBasicGroup = pObj->basic_group_.get();
if (pBasicGroup->upgraded_to_supergroup_id_)
- if (auto *pUser = FindUser(pBasicGroup->upgraded_to_supergroup_id_))
+ if (auto *pUser = FindUser(pBasicGroup->upgraded_to_supergroup_id_)) {
pUser->bLoadMembers = true;
+ if (pUser->m_si)
+ pUser->m_si->bHasNicklist = true;
+ }
auto iStatusId = pBasicGroup->status_->get_id();
if (iStatusId == TD::chatMemberStatusBanned::ID) {