summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-04-18 19:03:20 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-04-18 19:03:24 +0300
commit4ab75b1f53d04276b0658a710005f91d74018ab4 (patch)
treeaabb7232bb28d3b5efca7aa67bcf2df0f929374a /protocols/Telegram/src/server.cpp
parent2ac29594d76f2cf75b59aa1889568bf742a24916 (diff)
db_event_delivered support for Telegram & ICQ
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r--protocols/Telegram/src/server.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 2b2e1a4e63..d5755cbed1 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -281,9 +281,12 @@ void CTelegramProto::ProcessResponse(td::ClientManager::Response response)
TG_OWN_MESSAGE tmp(0, 0, szOldId);
if (auto *pOwnMsg = m_arOwnMsg.find(&tmp)) {
+ auto szMsgId = msg2id(pMessage);
if (pOwnMsg->hAck)
- ProtoBroadcastAck(pOwnMsg->hContact ? pOwnMsg->hContact : m_iSavedMessages, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, pOwnMsg->hAck, (LPARAM)msg2id(pMessage).c_str());
+ ProtoBroadcastAck(pOwnMsg->hContact ? pOwnMsg->hContact : m_iSavedMessages, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, pOwnMsg->hAck, (LPARAM)szMsgId.c_str());
+ if (auto hDbEvent = db_event_getById(m_szModuleName, szMsgId))
+ db_event_delivered(pOwnMsg->hContact, hDbEvent);
m_arOwnMsg.remove(pOwnMsg);
}
}