summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-17 20:14:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-17 20:14:18 +0300
commit2c24fa93c95554e9c1ea46df9a202157951714cc (patch)
tree91d35b54767afddc1e4a5ba7398db9a154844bfe /protocols/ICQ-WIM/src/server.cpp
parentb8ee680ac79eb37cd1ff1ca9e1b1a0dbcf830b9b (diff)
fixes #2352 (ICQ-WIM: separate flag for ParseMessage to use server-side or local time)
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 010c2e2741..f9442cabcc 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -367,7 +367,7 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact)
return hContact;
}
-void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNode &it, bool bCreateRead)
+void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNode &it, bool bCreateRead, bool bLocalTime)
{
CMStringA szMsgId(it["msgId"].as_mstring());
__int64 msgId = _atoi64(szMsgId);
@@ -390,7 +390,7 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo
wszText.TrimRight();
}
- int iMsgTime = (bCreateRead) ? it["time"].as_int() : time(0);
+ int iMsgTime = (bLocalTime) ? time(0) : it["time"].as_int();
if (isChatRoom(hContact)) {
CMStringA reqId(it["reqId"].as_mstring());
@@ -914,7 +914,7 @@ void CIcqProto::OnGetUserHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pR
auto &results = root.results();
for (auto &it : results["messages"])
- ParseMessage(pReq->hContact, lastMsgId, it, pReq->pUserInfo != nullptr);
+ ParseMessage(pReq->hContact, lastMsgId, it, pReq->pUserInfo != nullptr, false);
setId(pReq->hContact, DB_KEY_LASTMSGID, lastMsgId);
}