summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/process.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-07-16 13:38:08 +0000
committerRobert Pösel <robyer@seznam.cz>2016-07-16 13:38:08 +0000
commit3a30fdfc6c545ba51cf1587b58b22316f2622e8f (patch)
tree06daf3b099663cba01f6e2432ca8f2b8f020bbee /protocols/FacebookRM/src/process.cpp
parent5dc9ff65b453efdcbe2218720307fae52b5d6e90 (diff)
Facebook: Improve working with different user types (friend, user, page)
Also simplify arguments of AddToContactList method. And don't show auth items in contact menu for page contacts. git-svn-id: http://svn.miranda-ng.org/main/trunk@17099 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r--protocols/FacebookRM/src/process.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index ee12864581..aba751c8b9 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -169,7 +169,7 @@ void FacebookProto::ProcessFriendList(void*)
// Check remaining contacts in map and add them to contact list
for (std::map< std::string, facebook_user* >::iterator it = friends.begin(); it != friends.end();) {
if (!it->second->deleted)
- AddToContactList(it->second, CONTACT_FRIEND, true); // we know this contact doesn't exists, so we force add it
+ AddToContactList(it->second, true); // we know this contact doesn't exists, so we force add it
delete it->second;
it = friends.erase(it);
@@ -828,7 +828,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message> &messages, boo
// We don't have this contact, lets load info about him
LoadContactInfo(&fbu);
- hContact = AddToContactList(&fbu, CONTACT_NONE);
+ hContact = AddToContactList(&fbu);
}
if (!hContact) {
@@ -1033,9 +1033,10 @@ void FacebookProto::ProcessFriendRequests(void*)
facebook_user fbu;
fbu.real_name = utils::text::remove_html(utils::text::source_get_value(&req, 3, "<a", ">", "</a>"));
fbu.user_id = utils::text::source_get_value2(&get, "confirm=", "&\"");
+ fbu.type = CONTACT_APPROVE;
if (!fbu.user_id.empty() && !fbu.real_name.empty()) {
- MCONTACT hContact = AddToContactList(&fbu, CONTACT_APPROVE);
+ MCONTACT hContact = AddToContactList(&fbu);
setByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, CONTACT_APPROVE);
bool isNew = false;