summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_commands.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2017-03-09 23:41:08 +0300
committeraunsane <aunsane@gmail.com>2017-03-09 23:41:45 +0300
commit9153b50b7815e27043cf4dedd6968c7901157cdf (patch)
treea233295de20425ac77a888e6f6e2b6571197f01c /plugins/Dropbox/src/dropbox_commands.cpp
parent063a61cf745e1c51f4c9791d03832740f7dc0347 (diff)
Dropbox: chaged method that shares links:
now it generates temporary direct linc to a file
Diffstat (limited to 'plugins/Dropbox/src/dropbox_commands.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_commands.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/Dropbox/src/dropbox_commands.cpp b/plugins/Dropbox/src/dropbox_commands.cpp
index 469b17256f..350fd3d8c7 100644
--- a/plugins/Dropbox/src/dropbox_commands.cpp
+++ b/plugins/Dropbox/src/dropbox_commands.cpp
@@ -77,8 +77,7 @@ void CDropbox::CommandShare(void *arg)
}
ptrA token(db_get_sa(NULL, MODULE, "TokenSecret"));
- //bool useShortUrl = db_get_b(NULL, MODULE, "UseSortLinks", 1) > 0;
- ShareRequest request(token, path);
+ GetTemporaryLinkRequest request(token, path);
NLHR_PTR response(request.Send(param->instance->hNetlibConnection));
if (response == NULL || response->resultCode != HTTP_STATUS_OK) {
@@ -92,7 +91,7 @@ void CDropbox::CommandShare(void *arg)
return;
}
- CMStringA link = root.at("url").as_string().c_str();
+ CMStringA link = root.at("link").as_string().c_str();
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)link.GetBuffer());
}