diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-12-01 13:32:25 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-12-01 13:32:25 +0000 |
commit | f7782fbf614361339617da21e6220044ffcf6822 (patch) | |
tree | 4693e83c7bf9ea43c9ebe7c1ad1b17c1f90589a1 /protocols/FacebookRM/src/proto.cpp | |
parent | e59cf737e53afb22c054a6928412f085ba1ac26c (diff) |
Facebook: Fix sending private message to user in chat, which is not in contactlist yet
git-svn-id: http://svn.miranda-ng.org/main/trunk@11193 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 463b7c1e89..ec8ee11424 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -288,16 +288,13 @@ MCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr) return NULL; } - MCONTACT hContact = AddToContactList(&fbu, CONTACT_NONE); - if (hContact) { - if (flags & PALF_TEMPORARY) { - db_set_b(hContact, "Clist", "Hidden", 1); - db_set_b(hContact, "Clist", "NotOnList", 1); - } - else if (db_get_b(hContact, "CList", "NotOnList", 0)) { - db_unset(hContact, "CList", "Hidden"); - db_unset(hContact, "CList", "NotOnList"); - } + bool add_temporarily = (flags & PALF_TEMPORARY); + MCONTACT hContact = AddToContactList(&fbu, CONTACT_NONE, false, add_temporarily); + + // Reset NotOnList flag if present and we're adding this contact not temporarily + if (hContact && !add_temporarily && db_get_b(hContact, "CList", "NotOnList", 0)) { + db_unset(hContact, "CList", "Hidden"); + db_unset(hContact, "CList", "NotOnList"); } return hContact; |