From b58bd0a705dba9a32e4db1420e2d615c6ee6bd41 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 Jan 2025 15:28:20 +0300 Subject: =?UTF-8?q?fixes=20#4830=20(SkypeWeb:=20=D1=80=D0=B5=D0=B4=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D1=81=D0=B2=D0=BE=D1=91=20=D1=81=D0=BE=D0=BE=D0=B1?= =?UTF-8?q?=D1=89=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B8=D1=85=D0=BE?= =?UTF-8?q?=D0=B4=D0=B8=D1=82=20=D0=BA=D0=B0=D0=BA=20=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D0=B5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/SkypeWeb/src/skype_files.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_files.cpp') diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp index 6d3f6646db..41608e3c8b 100644 --- a/protocols/SkypeWeb/src/skype_files.cpp +++ b/protocols/SkypeWeb/src/skype_files.cpp @@ -256,15 +256,10 @@ void CSkypeProto::OnASMObjectUploaded(MHttpResponse *response, AsyncHttpRequest tinyxml2::XMLPrinter printer(0, true); doc.Print(&printer); - uint32_t hMessage; - Utils_GetRandom(&hMessage, sizeof(hMessage)); - hMessage &= ~0x80000000; - // create a new file transfer event using previously filled slot - auto *pReq = new AsyncHttpRequest(REQUEST_POST, HOST_DEFAULT, 0, &CSkypeProto::OnMessageSent); + auto *pReq = new AsyncHttpRequest(REQUEST_POST, HOST_DEFAULT); pReq->m_szUrl.AppendFormat("/users/ME/conversations/%s/messages", mir_urlEncode(getId(fup->hContact)).c_str()); pReq->hContact = fup->hContact; - pReq->pUserInfo = (HANDLE)hMessage; JSONNode ref(JSON_ARRAY); ref.set_name("amsreferences"); ref << CHAR_PARAM("", fup->uid); @@ -274,7 +269,7 @@ void CSkypeProto::OnASMObjectUploaded(MHttpResponse *response, AsyncHttpRequest else node << CHAR_PARAM("messagetype", "RichText/Media_GenericFile"); - node << INT64_PARAM("clientmessageid", time(0)) << CHAR_PARAM("contenttype", "text") << CHAR_PARAM("content", printer.CStr()) << ref; + node << INT64_PARAM("clientmessageid", getRandomId()) << CHAR_PARAM("contenttype", "text") << CHAR_PARAM("content", printer.CStr()) << ref; pReq->m_szParam = node.write().c_str(); PushRequest(pReq); -- cgit v1.2.3