From e441a31e9f912fc8e9244d16560565559b1924d2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 Sep 2019 23:43:06 +0300 Subject: end of manual experiments with CList/NotOnList --- protocols/Discord/src/proto.cpp | 2 +- protocols/Discord/src/utils.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/Discord') diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index b9b1dc1810..355ffd9d7a 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -341,7 +341,7 @@ MCONTACT CDiscordProto::AddToList(int flags, PROTOSEARCHRESULT *psr) MCONTACT hContact = db_add_contact(); Proto_AddToContact(hContact, m_szModuleName); if (flags & PALF_TEMPORARY) - db_set_b(hContact, "CList", "NotOnList", 1); + Contact_RemoveFromList(hContact); *p = 0; CDiscordUser *pUser = new CDiscordUser(0); diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index 95a7b098c3..e26317d0f8 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -228,13 +228,13 @@ void CDiscordProto::ProcessType(CDiscordUser *pUser, const JSONNode &pRoot) { switch (pRoot["type"].as_int()) { case 1: // confirmed - db_unset(pUser->hContact, "CList", "NotOnList"); + Contact_PutOnList(pUser->hContact); delSetting(pUser->hContact, DB_KEY_REQAUTH); delSetting(pUser->hContact, "ApparentMode"); break; case 3: // expecting authorization - db_set_b(pUser->hContact, "CList", "NotOnList", 1); + Contact_RemoveFromList(pUser->hContact); if (!getByte(pUser->hContact, DB_KEY_REQAUTH, 0)) { setByte(pUser->hContact, DB_KEY_REQAUTH, 1); -- cgit v1.2.3