summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/cloud_service.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2017-04-26 23:29:30 +0300
committeraunsane <aunsane@gmail.com>2017-04-26 23:29:30 +0300
commit37bd274cc2581512307abb78e7dd6800dd69e90c (patch)
treed2f17bf4905dcb27f738c81bc7f91ca5bf7e9f83 /plugins/CloudFile/src/cloud_service.cpp
parente12dfaff436fe7d882d065f3a724c39eadc67033 (diff)
CloudFile: fix sending to metacontacs
Diffstat (limited to 'plugins/CloudFile/src/cloud_service.cpp')
-rw-r--r--plugins/CloudFile/src/cloud_service.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/CloudFile/src/cloud_service.cpp b/plugins/CloudFile/src/cloud_service.cpp
index bbee441372..f8b8b1e976 100644
--- a/plugins/CloudFile/src/cloud_service.cpp
+++ b/plugins/CloudFile/src/cloud_service.cpp
@@ -46,6 +46,22 @@ CCloudService::CCloudService(HNETLIBUSER hConnection)
{
}
+void CCloudService::OpenUploadDialog(MCONTACT hContact)
+{
+ char *proto = GetContactProto(hContact);
+ if (!mir_strcmpi(proto, META_PROTO))
+ hContact = CallService(MS_MC_GETMOSTONLINECONTACT, hContact);
+
+ auto it = InterceptedContacts.find(hContact);
+ if (it == InterceptedContacts.end())
+ {
+ HWND hwnd = (HWND)CallService(MS_FILE_SENDFILE, hContact, 0);
+ InterceptedContacts[hContact] = hwnd;
+ }
+ else
+ SetActiveWindow(it->second);
+}
+
void CCloudService::SendToContact(MCONTACT hContact, const wchar_t *data)
{
const char *szProto = GetContactProto(hContact);