From ec6025510d1330001b76ea57291386b22377c653 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 8 Sep 2024 15:27:08 +0300 Subject: =?UTF-8?q?fixes=20#4630=20(Skypeweb:=20=D0=BD=D0=B5=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82=20=D1=83=D0=B4=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=20=D1=81=D0=B5=D1=80=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/SkypeWeb/src/skype_messages.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_messages.cpp') 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); } -- cgit v1.2.3