diff options
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_contacts.cpp | 9 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 3 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_poll_processing.cpp | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 10 |
4 files changed, 17 insertions, 9 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 0e00c5753b..dee3f7adc6 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -227,6 +227,15 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response) db_set_b(hContact, "CList", "Hidden", 1);
setByte(hContact, "IsBlocked", 1);
}
+ else
+ {
+ if (db_get_b(hContact, m_szModuleName, "IsBlocked", 0))
+ {
+ db_set_dw(hContact, "Ignore", "Mask1", 0);
+ db_set_b(hContact, "CList", "Hidden", 0);
+ setByte(hContact, "IsBlocked", 0);
+ }
+ }
skypenames.insert(mir_strdup(skypename));
}
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index ce6a672766..98b10b9a38 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -52,7 +52,9 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) int emoteOffset = atoi(ptrA(mir_t2a(ptrT(json_as_string(json_get(message, "skypeemoteoffset"))))));
time_t timestamp = IsoToUnixTime(composeTime);
ptrA skypename(ContactUrlToName(from));
+
bool isEdited = (json_get(message, "skypeeditedid") != NULL);
+
MCONTACT hContact = FindContact(ptrA(ContactUrlToName(conversationLink)));
if (conversationLink != NULL && strstr(conversationLink, "/8:"))
{
@@ -218,7 +220,6 @@ void CSkypeProto::OnSyncHistory(const NETLIBHTTPREQUEST *response) char *clientMsgId = mir_t2a(json_as_string(json_get(lastMessage, "clientmessageid")));
char *skypeEditedId = mir_t2a(json_as_string(json_get(lastMessage, "skypeeditedid")));
- bool isEdited = (skypeEditedId != NULL);
char *conversationLink = mir_t2a(json_as_string(json_get(lastMessage, "conversationLink")));
time_t composeTime(IsoToUnixTime(ptrT(json_as_string(json_get(lastMessage, "composetime")))));
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index 488bf66668..e6a46d531c 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -24,7 +24,7 @@ void CSkypeProto::ProcessEndpointPresenceRes(JSONNODE *node) ptrA skypename(ContactUrlToName(selfLink));
if (skypename == NULL)
return;
- MCONTACT hContact = FindContact(skypename);
+ MCONTACT hContact = AddContact(skypename, true);
//"publicInfo":{"capabilities":"","typ":"11","skypeNameVersion":"0/7.1.0.105//","nodeInfo":"","version":"24"}
JSONNODE *publicInfo = json_get(node, "publicInfo");
@@ -104,7 +104,7 @@ void CSkypeProto::ProcessUserPresenceRes(JSONNODE *node) }
return;
}
- MCONTACT hContact = FindContact(skypename);
+ MCONTACT hContact = AddContact(skypename, true);
SetContactStatus(hContact, SkypeToMirandaStatus(status));
}
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index c89e184fad..3f76c3e731 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -92,6 +92,7 @@ void CSkypeProto::OnHealth(const NETLIBHTTPREQUEST*) void CSkypeProto::OnTrouterEvent(JSONNODE *body, JSONNODE *headers)
{
ptrT displayname(json_as_string(json_get(body, "displayName")));
+ ptrT cuid(json_as_string(json_get(body, "callerId")));
ptrT uid(json_as_string(json_get(body, "conversationId")));
ptrA callId(mir_t2a(ptrT(json_as_string(json_get(body, "callId")))));
int evt = json_as_int(json_get(body, "evt"));
@@ -126,7 +127,7 @@ void CSkypeProto::OnTrouterEvent(JSONNODE *body, JSONNODE *headers) }
break;
}
- case 104: //call canceled
+ case 104: //call canceled: callerId=""; conversationId=NULL; callId=call id
{
break;
}
@@ -185,11 +186,6 @@ void CSkypeProto::TRouterThread(void*) CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)response);
delete request;
}
-
- if (!isTerminated)
- {
- debugLogA(__FUNCTION__": unexpected termination; switching protocol to offline");
- }
m_hTrouterThread = NULL;
m_TrouterConnection = NULL;
debugLogA(__FUNCTION__": leaving");
@@ -213,7 +209,9 @@ INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM wParam, LPARAM hContact) break;
}
}
+
if (wParam == 1)
NotifyEventHooks(m_hCallHook, (WPARAM)hContact, (LPARAM)0);
+
return 0;
}
\ No newline at end of file |