From aa312e59cd0065e20ffdf78cd49811ba0520c0bd Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 3 Jul 2013 19:45:53 +0000 Subject: Skype: - fixed files(contacts) sending in conference (issue #397) - fixes in contacts blocking - some small fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@5223 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_proto.cpp | 40 +++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'protocols/Skype/src/skype_proto.cpp') diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 9a52404047..e8eadfd162 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -346,11 +346,21 @@ int __cdecl CSkypeProto::SendContacts(HANDLE hContact, int flags, int nContacts, if (this->IsOnline() && hContact && hContactsList) { this->Log(L"Outcoming contacts"); - SEStringList targets; - targets.append((char *)_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID))); - CConversation::Ref conversation; - this->GetConversationByParticipants(targets, conversation); + ConversationRef conversation; + if ( !this->IsChatRoom(hContact)) + { + SEStringList targets; + targets.append((char *)_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID))); + + this->GetConversationByParticipants(targets, conversation); + } + else + { + this->GetConversationByIdentity((char *)_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)), conversation); + } + if ( !conversation) + return 0; ContactRefs contacts; for (int i = 0; i < nContacts; i++) @@ -387,19 +397,29 @@ HANDLE __cdecl CSkypeProto::SendFile(HANDLE hContact, const TCHAR *szDescription if (this->IsOnline() && hContact && ppszFiles) { this->Log(L"Outcoming file transfer"); - SEStringList targets; - targets.append((char *)_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID))); - CConversation::Ref conversation; - this->GetConversationByParticipants(targets, conversation); + ConversationRef conversation; + if ( !this->IsChatRoom(hContact)) + { + SEStringList targets; + targets.append((char *)_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID))); + + this->GetConversationByParticipants(targets, conversation); + } + else + { + this->GetConversationByIdentity((char *)_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)), conversation); + } + if ( !conversation) + return 0; SEFilenameList fileList; for (int i = 0; ppszFiles[i]; i++) fileList.append((char *)ptrA(::mir_utf8encodeW(ppszFiles[i]))); auto error = TRANSFER_OPEN_SUCCESS; - SEFilename errFile; MessageRef msgRef; - //(char *)mir_ptr(::mir_utf8encodeW(szDescription)) + SEFilename errFile; + MessageRef msgRef; if ( !conversation->PostFiles(fileList, " ", error, errFile, msgRef) || error) return 0; -- cgit v1.2.3