diff options
author | aunsane <aunsane@gmail.com> | 2017-04-26 23:29:30 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-04-26 23:29:30 +0300 |
commit | 37bd274cc2581512307abb78e7dd6800dd69e90c (patch) | |
tree | d2f17bf4905dcb27f738c81bc7f91ca5bf7e9f83 /plugins/CloudFile/src/cloud_service.cpp | |
parent | e12dfaff436fe7d882d065f3a724c39eadc67033 (diff) |
CloudFile: fix sending to metacontacs
Diffstat (limited to 'plugins/CloudFile/src/cloud_service.cpp')
-rw-r--r-- | plugins/CloudFile/src/cloud_service.cpp | 16 |
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); |