diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-30 12:01:09 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-30 12:01:09 +0300 |
commit | 932c6454190cccc4a3dd26b42e439f26104df1dc (patch) | |
tree | 23c3aee2a3726b2f3f9e13c4e06e547cbd6fccc2 /protocols | |
parent | 170f3ffab20cd0cea6ccb9c4ff4420f2fdf1f603 (diff) |
code cleaning
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Telegram/src/server.cpp | 13 |
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);
}
|