summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-02-07 13:21:34 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-02-07 13:21:34 +0000
commitf6cffadc110a89c8ff6b533f20d9a01e55af0ee6 (patch)
tree2694e8cabbf9a8e480cbc6e90691f69f1207818a /protocols
parentc94c7bdf263c2855bf8f1ae7cd4f22340d7f48d4 (diff)
SkypeWeb: correct xml
git-svn-id: http://svn.miranda-ng.org/main/trunk@16236 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/src/skype_files.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp
index 451cf2d9dc..58400bb74e 100644
--- a/protocols/SkypeWeb/src/skype_files.cpp
+++ b/protocols/SkypeWeb/src/skype_files.cpp
@@ -68,14 +68,19 @@ void CSkypeProto::OnASMObjectUploaded(const NETLIBHTTPREQUEST *response, void *a
CFileUploadParam *fup = (CFileUploadParam*)arg;
if (response == nullptr) return;
CMStringA url(response->szUrl);
-
+
+ TCHAR *tszFile = fup->tszFileName;
+
HXML xml = xmlCreateNode(L"URIObject", nullptr, 0);
- HXML xmlTitle = xmlAddChild(xml, L"Title", fup->tszFileName);
+ HXML xmlTitle = xmlAddChild(xml, L"Title", tszFile);
HXML xmlDescr = xmlAddChild(xml, L"Description", fup->tszDesc);
HXML xmlA = xmlAddChild(xml, L"a", CMStringW(FORMAT, L"https://login.skype.com/login/sso?go=webclient.xmm&docid=%s", _A2T(fup->uid)));
- HXML xmlOrigName = xmlAddChild(xml, L"OriginalName", fup->tszFileName);
- HXML xmlSize = xmlAddChild(xml, L"FileSize", CMStringW(FORMAT, L"%d", fup->size));
-
+ xmlAddAttr(xmlA, L"href", CMStringW(FORMAT, L"https://login.skype.com/login/sso?go=webclient.xmm&docid=%s", _A2T(fup->uid)));
+ HXML xmlOrigName = xmlAddChild(xml, L"OriginalName", nullptr);
+ xmlAddAttr(xmlOrigName, L"v", tszFile);
+ HXML xmlSize = xmlAddChild(xml, L"FileSize", nullptr);
+ xmlAddAttr(xmlSize, L"v", CMStringW(FORMAT, L"%d", fup->size));
+
xmlAddAttr(xml, L"Type", L"File.1");
xmlAddAttr(xml, L"uri", CMStringW(FORMAT, L"https://api.asm.skype.com/v1/objects/%s", _A2T(fup->uid)));
xmlAddAttr(xml, L"url_thumbnail", CMStringW(FORMAT, L"https://api.asm.skype.com/v1/objects/%s/views/thumbnail", _A2T(fup->uid)));