summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_messages.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-08 15:27:08 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-08 15:27:08 +0300
commitec6025510d1330001b76ea57291386b22377c653 (patch)
tree870e1972eb9e9134c066776eed993f94004d4e4f /protocols/SkypeWeb/src/skype_messages.cpp
parent664dbdb0cb541f5bcfe334a73a2166a5a25d8920 (diff)
fixes #4630 (Skypeweb: не работает удаление сообщения с сервера)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index db01c0308e..76b2e772d7 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -93,12 +93,15 @@ bool CSkypeProto::ParseMessage(const JSONNode &node, DB::EventInfo &dbei)
auto &pContent = node["content"];
if (!pContent) {
+LBL_Deleted:
if (dbei)
db_event_delete(dbei.getEvent());
return false;
}
CMStringW wszContent = pContent.as_mstring();
+ if (wszContent.IsEmpty())
+ goto LBL_Deleted;
std::string strMessageType = node["messagetype"].as_string();
if (strMessageType == "RichText/Media_GenericFile" || strMessageType == "RichText/Media_Video" || strMessageType == "RichText/UriObject" ) {
@@ -153,14 +156,14 @@ void CSkypeProto::ProcessNewMessage(const JSONNode &node)
int iUserType;
UrlToSkypeId(node["conversationLink"].as_string().c_str(), &iUserType);
- CMStringA szMessageId = node["clientmessageid"] ? node["clientmessageid"].as_mstring() : node["skypeeditedid"].as_mstring();
+ CMStringA szMessageId = node["id"].as_mstring();
CMStringA szConversationName(UrlToSkypeId(node["conversationLink"].as_string().c_str()));
CMStringA szFromSkypename(UrlToSkypeId(node["from"].as_mstring()));
MCONTACT hContact = AddContact(szConversationName, nullptr, true);
if (m_bHistorySynced) {
- int64_t lastMsgId = _atoi64(node["id"].as_string().c_str());
+ int64_t lastMsgId = _atoi64(szMessageId);
if (lastMsgId > getLastTime(hContact))
setLastTime(hContact, lastMsgId);
}