diff options
author | George Hazan <ghazan@miranda.im> | 2020-12-20 16:52:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-12-20 16:52:04 +0300 |
commit | e8f02156813b7153d4970fd83f2e6adac3517923 (patch) | |
tree | 49632cf70e8dc0f6b464a0bbc6e06e0c88c2ca90 /protocols/SkypeWeb/src/skype_polling.cpp | |
parent | ab6c868bccb088d493ab4016fd1918d822adfc2b (diff) |
SkypeWeb: protocol reworked almost from scratch to support contact types other than 8 & 19
Diffstat (limited to 'protocols/SkypeWeb/src/skype_polling.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_polling.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/skype_polling.cpp b/protocols/SkypeWeb/src/skype_polling.cpp index c4d0f695c4..7bb3117574 100644 --- a/protocols/SkypeWeb/src/skype_polling.cpp +++ b/protocols/SkypeWeb/src/skype_polling.cpp @@ -102,7 +102,7 @@ void CSkypeProto::ProcessEndpointPresence(const JSONNode &node) {
debugLogA(__FUNCTION__);
std::string selfLink = node["selfLink"].as_string();
- CMStringA skypename(UrlToSkypename(selfLink.c_str()));
+ CMStringA skypename(UrlToSkypeId(selfLink.c_str()));
MCONTACT hContact = FindContact(skypename);
if (hContact == NULL)
@@ -169,7 +169,7 @@ void CSkypeProto::ProcessUserPresence(const JSONNode &node) std::string selfLink = node["selfLink"].as_string();
std::string status = node["status"].as_string();
- CMStringA skypename = UrlToSkypename(selfLink.c_str());
+ CMStringA skypename = UrlToSkypeId(selfLink.c_str());
if (!skypename.IsEmpty()) {
if (IsMe(skypename)) {
@@ -195,9 +195,12 @@ void CSkypeProto::ProcessNewMessage(const JSONNode &node) std::string conversationLink = node["conversationLink"].as_string();
- if (conversationLink.find("/8:") != std::string::npos)
+ int iUserType;
+ UrlToSkypeId(conversationLink.c_str(), &iUserType);
+
+ if (iUserType == 2 || iUserType == 8)
OnPrivateMessageEvent(node);
- else if (conversationLink.find("/19:") != std::string::npos)
+ else if (iUserType == 19)
OnChatEvent(node);
}
|