summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-30 12:01:09 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-30 12:01:09 +0300
commit932c6454190cccc4a3dd26b42e439f26104df1dc (patch)
tree23c3aee2a3726b2f3f9e13c4e06e547cbd6fccc2 /protocols/Telegram/src
parent170f3ffab20cd0cea6ccb9c4ff4420f2fdf1f603 (diff)
code cleaning
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r--protocols/Telegram/src/server.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 0a7703fdfb..acf31c7e96 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -224,19 +224,20 @@ void CTelegramProto::ProcessResponse(td::ClientManager::Response response)
case TD::updateMessageSendSucceeded::ID:
{
- auto *pMessage = (TD::updateMessageSendSucceeded *)response.object.get();
+ auto *pUpdate = (TD::updateMessageSendSucceeded *)response.object.get();
+ auto *pMessage = pUpdate->message_.get();
- auto szOldId = msg2id(pMessage->message_->chat_id_, pMessage->old_message_id_);
- if (pMessage->old_message_id_)
+ auto szOldId = msg2id(pMessage->chat_id_, pUpdate->old_message_id_);
+ if (pUpdate->old_message_id_)
if (auto hDbEvent = db_event_getById(m_szModuleName, szOldId))
- db_event_updateId(hDbEvent, msg2id(pMessage->message_.get()));
+ db_event_updateId(hDbEvent, msg2id(pMessage));
- ProcessMessage(pMessage->message_.get());
+ ProcessMessage(pMessage);
TG_OWN_MESSAGE tmp(0, 0, szOldId);
if (auto *pOwnMsg = m_arOwnMsg.find(&tmp)) {
if (pOwnMsg->hAck)
- ProtoBroadcastAck(pOwnMsg->hContact ? pOwnMsg->hContact : m_iSavedMessages, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, pOwnMsg->hAck, (LPARAM)pOwnMsg->szMsgId.c_str());
+ ProtoBroadcastAck(pOwnMsg->hContact ? pOwnMsg->hContact : m_iSavedMessages, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, pOwnMsg->hAck, (LPARAM)msg2id(pMessage).c_str());
m_arOwnMsg.remove(pOwnMsg);
}