From caf86dc4db73bfca0e41371e204624061251f062 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 17 Nov 2012 17:21:34 +0000 Subject: fixed project for new skypekit fixed sending auth request fixed adding in contact list git-svn-id: http://svn.miranda-ng.org/main/trunk@2337 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/Skype.vcxproj | 2 +- protocols/Skype/src/skype_contacts.cpp | 6 +++--- protocols/Skype/src/skype_menus.cpp | 2 +- protocols/Skype/src/skype_proto.cpp | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/protocols/Skype/Skype.vcxproj b/protocols/Skype/Skype.vcxproj index d839af5040..92a04d0a97 100644 --- a/protocols/Skype/Skype.vcxproj +++ b/protocols/Skype/Skype.vcxproj @@ -57,7 +57,7 @@ Windows true - $(SolutionDir)\lib;$(SolutionDir)..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\build + $(SolutionDir)\lib;$(SolutionDir)..\..\SkypeKit\SDK\lib\Debug $(IntDir)$(TargetName).lib Shlwapi.lib;Ws2_32.lib;Advapi32.lib;skypekit-cyassl_lib.lib;skypekit-cppwrapper_2_lib.lib;%(AdditionalDependencies) diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 063091ac06..a6adcb36fa 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -262,7 +262,7 @@ void CSkypeProto::UpdateContactStatus(HANDLE hContact, CContact::Ref contact) this->SetSettingWord(hContact, SKYPE_SETTINGS_STATUS, this->SkypeToMirandaStatus(availability)); if (availability == CContact::PENDINGAUTH) - this->SetSettingWord(hContact, "Auth", 1); + this->SetSettingByte(hContact, "Auth", 1); else this->DeleteSetting(hContact, "Auth"); } @@ -598,10 +598,10 @@ HANDLE CSkypeProto::AddContactBySid(const wchar_t* sid, const wchar_t* nick, DWO { contact.fetch(); bool result; - if (contact->IsMemberOfHardwiredGroup(CContactGroup::ALL_KNOWN_CONTACTS, result) && result) + if (contact->IsMemberOfHardwiredGroup(CContactGroup::ALL_BUDDIES, result)) { CContactGroup::Ref group; - if (g_skype->GetHardwiredContactGroup(CContactGroup::ALL_KNOWN_CONTACTS, group)) + if (g_skype->GetHardwiredContactGroup(CContactGroup::ALL_BUDDIES, group)) { group.fetch(); group->AddContact(contact); diff --git a/protocols/Skype/src/skype_menus.cpp b/protocols/Skype/src/skype_menus.cpp index 0b47f6882d..e0a33fb9d1 100644 --- a/protocols/Skype/src/skype_menus.cpp +++ b/protocols/Skype/src/skype_menus.cpp @@ -69,7 +69,7 @@ INT_PTR GlobalService(WPARAM wParam, LPARAM lParam) int CSkypeProto::RequestAuth(WPARAM wParam, LPARAM lParam) { // todo: set default auth request - return this->AuthRequest((HANDLE)wParam, LPGENT("")); + return this->AuthRequest((HANDLE)wParam, LPGENT("Hi! I\'d like to add you to my contact list")); } int CSkypeProto::GrantAuth(WPARAM wParam, LPARAM lParam) diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index e5b80508d2..12155af7e3 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -123,8 +123,10 @@ int __cdecl CSkypeProto::AuthRequest(HANDLE hContact, const TCHAR* szMessage) { CContact::Ref contact; SEString sid(::mir_u2a(this->GetSettingString(hContact, "sid"))); - if (g_skype->GetContact(sid, contact)) + if (g_skype->GetContact(sid, contact)) { + contact->SetBuddyStatus(Contact::AUTHORIZED_BY_ME); contact->SendAuthRequest(::mir_u2a(szMessage)); + } return 0; } -- cgit v1.2.3