summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-27 23:43:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-27 23:43:06 +0300
commite441a31e9f912fc8e9244d16560565559b1924d2 (patch)
treee9d47703f0e56bb5745e7e4e842d14ce989fe86d /protocols/JabberG
parent91811190c158e4ff97cc94ef93415c12ddf738ed (diff)
end of manual experiments with CList/NotOnList
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_misc.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp4
4 files changed, 5 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index 0b63c8b10d..1b0ddb05e7 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -1293,7 +1293,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
case SD_ACT_ROSTER:
{
MCONTACT hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), false, false);
- db_unset(hContact, "CList", "NotOnList");
+ Contact_PutOnList(hContact);
JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid(), hContact);
item->bUseResource = true;
}
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index c5f2534707..e4693220ae 100755
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -86,7 +86,7 @@ MCONTACT CJabberProto::DBCreateContact(const char *jid, const char *nick, bool t
if (nick != nullptr && *nick != '\0')
setUString(hNewContact, "Nick", nick);
if (temporary)
- db_set_b(hNewContact, "CList", "NotOnList", 1);
+ Contact_RemoveFromList(hNewContact);
else
SendGetVcard(hNewContact);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 5e31b10f3d..0122da30ba 100755
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -424,7 +424,7 @@ int CJabberProto::Authorize(MEVENT hDbEvent)
if (MCONTACT hContact = AddToListByJID(blob.get_email(), 0)) {
// Trigger actual add by removing the "NotOnList" added by AddToListByJID()
// See AddToListByJID() and JabberDbSettingChanged().
- db_unset(hContact, "CList", "NotOnList");
+ Contact_PutOnList(hContact);
}
}
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index b3446760ff..29e11ee2cc 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1684,7 +1684,7 @@ void CJabberProto::OnProcessPresence(const TiXmlElement *node, ThreadData *info)
ListRemoveResource(LIST_ROSTER, from);
hContact = HContactFromJID(from);
- if (hContact && db_get_b(hContact, "CList", "NotOnList", 0) == 1) {
+ if (hContact && !Contact_OnList(hContact)) {
// remove selfcontact, if where is no more another resources
if (item->arResources.getCount() == 1 && ResourceInfoFromJID(info->fullJID))
ListRemoveResource(LIST_ROSTER, info->fullJID);
@@ -1734,7 +1734,7 @@ void CJabberProto::OnProcessPresence(const TiXmlElement *node, ThreadData *info)
if (item)
item->hContact = hContact;
setUString(hContact, "Nick", szNick);
- db_unset(hContact, "CList", "NotOnList");
+ Contact_PutOnList(hContact);
}
}
}