summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_proto.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-07 21:50:05 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-07 21:50:05 +0000
commit90a05404a6ded56141c0230f663686439f8fa146 (patch)
tree6531783fbbedc04db025526243342823ed9ccd65 /protocols/SkypeWeb/src/skype_proto.cpp
parentde593c8e4ae504a8d159cc272740846ef9c20ca6 (diff)
SkypeWeb:
- added ability to getting contacts statuses - partly reworked login flow git-svn-id: http://svn.miranda-ng.org/main/trunk@12665 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index f9e43ba97c..91ab87bc78 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -149,9 +149,7 @@ int CSkypeProto::SetApparentMode(MCONTACT, int) { return 0; }
int CSkypeProto::SetStatus(int iNewStatus)
{
if (iNewStatus == m_iDesiredStatus)
- {
return 0;
- }
debugLogA(__FUNCTION__ ": changing status from %i to %i", m_iStatus, iNewStatus);
@@ -189,19 +187,17 @@ int CSkypeProto::SetStatus(int iNewStatus)
else if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE)
{
// login
- if (getStringA("Server") == NULL)
- setString("Server", "client-s.gateway.messenger.live.com");
m_iStatus = ID_STATUS_CONNECTING;
-
requestQueue->Start();
PushRequest(new LoginRequest(), &CSkypeProto::OnLoginFirst);
}
else
{
// set status
- m_iStatus = iNewStatus;
- PushRequest(new SetStatusRequest(ptrA(getStringA("registrationToken")), MirandaToSkypeStatus(m_iStatus), getStringA("Server")), &CSkypeProto::OnSetStatus);
- PushRequest(new GetEndpointRequest(getStringA("registrationToken"), getStringA("endpointId"), getStringA("Server")));
+ ptrA regToken(getStringA("registrationToken"));
+ ptrA endpoint(getStringA("endpointId"));
+ PushRequest(new SendCapabilitiesRequest(regToken, endpoint));
+ PushRequest(new SetStatusRequest(regToken, MirandaToSkypeStatus(m_iDesiredStatus)), &CSkypeProto::OnStatusChanged);
}
}