From 0e1f940df6112024a2f714a98077768d0eec0927 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 21 Apr 2013 06:18:42 +0000 Subject: fixed chat work git-svn-id: http://svn.miranda-ng.org/main/trunk@4495 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_contacts.cpp | 65 ++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 31 deletions(-) (limited to 'protocols/Skype/src/skype_contacts.cpp') diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 4e9090cbd7..c29580d1bc 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -265,37 +265,40 @@ void __cdecl CSkypeProto::LoadContactList(void*) void __cdecl CSkypeProto::LoadChatList(void*) { - //CConversation::Refs conversations; - //this->skype->GetConversationList(conversations); - //for (uint i = 0; i < conversations.size(); i++) - //{ - // CConversation::TYPE type; - // conversations[i]->GetPropType(type); - - // CConversation::MY_STATUS status; - // conversations[i]->GetPropMyStatus(status); - // if (type == CConversation::CONFERENCE) - // { - // SEString data; - - // conversations[i]->GetPropIdentity(data); - // char *cid = ::mir_strdup(data); - - // conversations[i]->GetPropDisplayname(data); - // char *name = ::mir_utf8decodeA(data); - - // HANDLE hContact = this->AddChatRoomByID(cid, name); - // //::DBWriteContactSettingString(hContact, this->m_szModuleName, "Nick", name); - - // CConversation::LOCAL_LIVESTATUS live; - // conversations[i]->GetPropLocalLivestatus(live); - - // if (status == CConversation::CONSUMER)// && live != CConversation::NONE) - // { - // this->JoinToChat(cid, false); - // } - // } - //} + CConversation::Refs conversations; + this->skype->GetConversationList(conversations); + for (uint i = 0; i < conversations.size(); i++) + { + CConversation::TYPE type; + conversations[i]->GetPropType(type); + + CConversation::MY_STATUS status; + conversations[i]->GetPropMyStatus(status); + if (type == CConversation::CONFERENCE) + { + SEString data; + + conversations[i]->GetPropIdentity(data); + wchar_t *cid = ::mir_utf8decodeW(data); + + conversations[i]->GetPropDisplayname(data); + wchar_t *name = ::mir_utf8decodeW(data); + + HANDLE hContact = this->AddChatRoomByID(cid, name); + //::DBWriteContactSettingString(hContact, this->m_szModuleName, "Nick", name); + + ::mir_free(cid); + ::mir_free(name); + + CConversation::LOCAL_LIVESTATUS live; + conversations[i]->GetPropLocalLivestatus(live); + + if (status == CConversation::CONSUMER)// && live != CConversation::NONE) + { + this->JoinToChat(cid, false); + } + } + } /*CConversation::Refs conversations; this->skype->GetConversationList(conversations); -- cgit v1.2.3