summaryrefslogtreecommitdiff
path: root/protocols/MSN
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-05-19 22:28:59 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-05-19 22:28:59 +0000
commita9502f70c15fbd1bb0e15f3fab05c1a6dc573248 (patch)
treeb32203c767af405b2842901dc5f7e0bf78d5aa9e /protocols/MSN
parent38a93d167307c8d1912abeaf32182abe97a03598 (diff)
Extended address book server sync to file contacts into correct lists
git-svn-id: http://svn.miranda-ng.org/main/trunk@13705 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN')
-rw-r--r--protocols/MSN/src/msn_soapab.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp
index 27ba917d24..073d8ac3aa 100644
--- a/protocols/MSN/src/msn_soapab.cpp
+++ b/protocols/MSN/src/msn_soapab.cpp
@@ -922,12 +922,19 @@ bool CMsnProto::MSN_ABRefreshClist(void)
szEmail = ezxml_txt(ezxml_child(cont, "objectId"));
}
else continue;
+ /* Other valid sourceIds:
+ * GOOG - Google
+ * SCD - Short circuit
+ * FB - Facebook */
if (!*szEmail) continue;
ezxml_t xmlnick = ezxml_child(pers, "nickname");
const char *pszNickname = xmlnick?xmlnick->txt:NULL;
- Lists_Add(LIST_FL, netId, szEmail, NULL, pszNickname);
+ int lstId = LIST_FL;
+ if (mir_strcmpi(ezxml_txt(ezxml_child(cont, "isBlocked")), "true") == 0) lstId = LIST_BL;
+ else if (mir_strcmp(ezxml_txt(ezxml_child(cont, "contactState")), "2") == 0) lstId = LIST_PL;
+ Lists_Add(lstId, netId, szEmail, NULL, pszNickname);
char szWLId[128];
mir_snprintf(szWLId, sizeof(szWLId), "%d:%s", netId, szEmail);
@@ -937,6 +944,8 @@ bool CMsnProto::MSN_ABRefreshClist(void)
const char* szNick = ezxml_txt(ezxml_child(pers, "orderedName"));
if (*szNick) db_set_utf(hContact, "CList", "MyHandle", szNick);
else db_unset(hContact, "CList", "MyHandle");
+ if (mir_strcmpi(ezxml_txt(ezxml_child(pers, "onHideList")), "true") == 0)
+ db_set_b(hContact, "CList", "Hidden", 1);
setString(hContact, "ID", ezxml_txt(ezxml_child(pers, "id")));
SetAbParam(hContact, "CID", cid);