From 916dd6f5013c2f1afbe3fa35f425d8e517266f90 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 Sep 2020 14:58:00 +0300 Subject: =?UTF-8?q?fixes=20#2560=20(AddContact+=20=D0=BD=D0=B5=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5=D1=82=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=D0=BA=D1=82=D1=8B=20Facebook)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Facebook/src/proto.cpp | 13 +++++++++++++ protocols/Facebook/src/proto.h | 1 + 2 files changed, 14 insertions(+) (limited to 'protocols/Facebook') diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp index 1cf3d3156c..b385a4e379 100644 --- a/protocols/Facebook/src/proto.cpp +++ b/protocols/Facebook/src/proto.cpp @@ -152,6 +152,19 @@ void FacebookProto::OnShutdown() ///////////////////////////////////////////////////////////////////////////////////////// +MCONTACT FacebookProto::AddToList(int, PROTOSEARCHRESULT *psr) +{ + if (!mir_wstrlen(psr->id.w)) + return 0; + + MCONTACT hContact = db_add_contact(); + Proto_AddToContact(hContact, m_szModuleName); + setWString(hContact, DBKEY_ID, psr->id.w); + return hContact; +} + +///////////////////////////////////////////////////////////////////////////////////////// + INT_PTR FacebookProto::GetCaps(int type, MCONTACT) { switch (type) { diff --git a/protocols/Facebook/src/proto.h b/protocols/Facebook/src/proto.h index 6ae38f2ca1..b1232b96e1 100644 --- a/protocols/Facebook/src/proto.h +++ b/protocols/Facebook/src/proto.h @@ -512,6 +512,7 @@ public: void OnModulesLoaded() override; void OnShutdown() override; + MCONTACT AddToList(int flags, PROTOSEARCHRESULT *psr) override; INT_PTR GetCaps(int type, MCONTACT hContact) override; int SendMsg(MCONTACT hContact, int flags, const char *pszSrc); int SetStatus(int iNewStatus) override; -- cgit v1.2.3