diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-03 11:08:15 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-03 11:08:15 +0000 |
commit | 6a16d16bcc07a7f857c9d051982db2f7aa035e37 (patch) | |
tree | 31a203a8071ec6c8168f81a187684a18241658ec | |
parent | d55f119efd560e3962436cbe70b423d0757dd9ea (diff) |
SkypeWeb: Notification on contacts & chats offline arfer logout removed.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13394 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/SkypeWeb/src/skype_contacts.cpp | 17 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 1 |
3 files changed, 21 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index dee3f7adc6..a8ed6868a0 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -36,7 +36,22 @@ void CSkypeProto::SetContactStatus(MCONTACT hContact, WORD status) void CSkypeProto::SetAllContactsStatus(WORD status)
{
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
- SetContactStatus(hContact, status);
+ {
+ if (!isChatRoom(hContact))
+ SetContactStatus(hContact, status);
+ else
+ SetContactStatus(hContact, status);
+ }
+}
+
+void CSkypeProto::SetChatStatus(MCONTACT hContact, int iStatus)
+{
+ ptrT tszChatID(getTStringA(hContact, "ChatRoomID"));
+ if (tszChatID == NULL)
+ return;
+ GCDEST gcd = { m_szModuleName, tszChatID, GC_EVENT_CONTROL };
+ GCEVENT gce = { sizeof(gce), &gcd };
+ CallServiceSync(MS_GC_EVENT, (iStatus == ID_STATUS_OFFLINE) ? SESSION_OFFLINE : SESSION_ONLINE, (LPARAM)&gce);
}
MCONTACT CSkypeProto::GetContactFromAuthEvent(MEVENT hEvent)
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 70124ca692..9c7acf6922 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -221,10 +221,12 @@ int CSkypeProto::SetStatus(int iNewStatus) }
requestQueue->Stop();
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE);
+ m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
+
if (!Miranda_Terminated())
SetAllContactsStatus(ID_STATUS_OFFLINE);
-
- m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
+ return 0;
}
else
{
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index cc9668083d..1c68f1a1b6 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -258,6 +258,7 @@ private: static void ResetOptions(HWND hwndDlg);
static void FilterContacts(HWND hwndDlg, CSkypeProto *ppro);
+ void SetChatStatus(MCONTACT hContact, int iStatus);
//polling
void __cdecl PollingThread (void*);
|