summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_proto.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-03-23 18:04:59 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-03-23 18:04:59 +0000
commitceb5a959c77bbfdb5f5054d6d694032aa323f674 (patch)
tree2a9bedb244201053be39ffbce6fbd86be87e1469 /protocols/SkypeWeb/src/skype_proto.cpp
parent4c42f50401b69f7ba0c87ea5d315173f0c9a8fcf (diff)
SkypeWeb: status support pt2 (patch from MikalaiR)
git-svn-id: http://svn.miranda-ng.org/main/trunk@12487 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index 82a3ec1b00..4f3adf6462 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -133,6 +133,8 @@ int CSkypeProto::SetStatus(int iNewStatus)
int old_status = m_iStatus;
m_iDesiredStatus = iNewStatus;
+ CMStringA endpointURL = getStringA("Endpoint");
+ endpointURL += "/presenceDocs/messagingService";
if (iNewStatus == ID_STATUS_OFFLINE)
{
@@ -149,8 +151,8 @@ int CSkypeProto::SetStatus(int iNewStatus)
}
else if (iNewStatus == ID_STATUS_INVISIBLE)
{
- PushRequest(new GetEndpointRequest(ptrA(getStringA("RegistrationToken")), ptrA(getStringA("Endpoint"))));
- PushRequest(new SetStatusRequest(ptrA(getStringA("RegistrationToken")), false));
+ PushRequest(new GetEndpointRequest(ptrA(getStringA("RegistrationToken")), endpointURL));
+ PushRequest(new SetStatusRequest(ptrA(getStringA("RegistrationToken")), false), &CSkypeProto::OnSetStatus);
}
else
{
@@ -159,7 +161,12 @@ int CSkypeProto::SetStatus(int iNewStatus)
return 0;
}
- if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE)
+ if (m_iStatus == ID_STATUS_INVISIBLE)
+ {
+ PushRequest(new GetEndpointRequest(ptrA(getStringA("RegistrationToken")), endpointURL));
+ PushRequest(new SetStatusRequest(ptrA(getStringA("RegistrationToken")), true), &CSkypeProto::OnSetStatus);
+ }
+ else if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE)
{
// login
m_iStatus = ID_STATUS_CONNECTING;
@@ -178,6 +185,7 @@ int CSkypeProto::SetStatus(int iNewStatus)
return 0;
}
+
HANDLE CSkypeProto::GetAwayMsg(MCONTACT) { return 0; }
int CSkypeProto::RecvAwayMsg(MCONTACT, int, PROTORECVEVENT*) { return 0; }