summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r--protocols/Telegram/src/proto.cpp2
-rw-r--r--protocols/Telegram/src/server.cpp4
-rw-r--r--protocols/Telegram/src/utils.cpp5
3 files changed, 5 insertions, 6 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp
index b0ce821946..d8d6f3a842 100644
--- a/protocols/Telegram/src/proto.cpp
+++ b/protocols/Telegram/src/proto.cpp
@@ -462,7 +462,7 @@ void CTelegramProto::ProcessFileMessage(TG_FILE_REQUEST *ft, const TD::message *
dbei.szModule = Proto_GetBaseAccountName(ft->m_hContact);
dbei.eventType = EVENTTYPE_FILE;
dbei.flags = DBEF_SENT | DBEF_UTF;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
TG_FILE_REQUEST localft(TG_FILE_REQUEST::FILE, 0, 0);
localft.m_fileName = Utf2T(pFile->local_->path_.c_str());
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 495d46523b..abcd38b677 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -465,7 +465,7 @@ void CTelegramProto::OnGetHistory(td::ClientManager::Response &response, void *p
DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.szModule = m_szModuleName;
- dbei.timestamp = pMsg->date_;
+ dbei.iTimestamp = pMsg->date_;
dbei.cbBlob = szBody.GetLength();
dbei.pBlob = szBody.GetBuffer();
dbei.szId = szMsgId;
@@ -990,7 +990,7 @@ void CTelegramProto::ProcessMessage(const TD::message *pMessage)
DB::EventInfo dbei(hOldEvent);
dbei.szId = szMsgId;
dbei.cbBlob = szText.GetLength();
- dbei.timestamp = pMessage->date_;
+ dbei.iTimestamp = pMessage->date_;
if (pMessage->is_outgoing_)
dbei.flags |= DBEF_SENT;
if (!pUser->bInited)
diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp
index 240322d81e..3d33b6b0c8 100644
--- a/protocols/Telegram/src/utils.cpp
+++ b/protocols/Telegram/src/utils.cpp
@@ -217,8 +217,7 @@ void CTelegramProto::MarkRead(MCONTACT hContact, const CMStringA &szMaxId, bool
if (dbei.szId > szMaxId)
break;
- bool isSent = (dbei.flags & DBEF_SENT) != 0;
- if (isSent != bSent)
+ if (dbei.bSent != bSent)
continue;
if (!dbei.markedRead())
@@ -462,7 +461,7 @@ bool CTelegramProto::GetMessageFile(const EmbeddedFile &F, TG_FILE_REQUEST::Type
DB::EventInfo dbei(db_event_getById(m_szModuleName, F.pszId));
dbei.flags = DBEF_TEMPORARY;
- dbei.timestamp = F.pMsg->date_;
+ dbei.iTimestamp = F.pMsg->date_;
dbei.szId = F.pszId;
dbei.szUserId = F.pszUser;
if (F.pMsg->is_outgoing_)