summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-07-17 13:08:09 +0000
committerRobert Pösel <robyer@seznam.cz>2013-07-17 13:08:09 +0000
commit76c0c4aa6a34e6d9299ba6a7cf6b9db428fde619 (patch)
tree8e1e69c560db21eb0e1595fc0c4be448cdac8d3f /protocols/FacebookRM/src
parent4a152792e289a2f75e7e47c3a9294ed7b24460e9 (diff)
Facebook:
- Fixed searching users at some circumstances and by e-mail - Don't allow to add contact with not numeric ID git-svn-id: http://svn.miranda-ng.org/main/trunk@5396 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r--protocols/FacebookRM/src/process.cpp2
-rw-r--r--protocols/FacebookRM/src/proto.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 3212fe1bc5..68159e5672 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -750,7 +750,7 @@ void FacebookProto::SearchAckThread(void *targ)
std::string id = utils::text::source_get_value2(&item, "?id=", "&\"");
if (id.empty())
- id = utils::text::source_get_value2(&item, "?slog=", "&\"");
+ id = utils::text::source_get_value2(&item, "?ids=", "&\"");
std::string name = utils::text::source_get_value(&item, 4, "<td class=\"name\">", "<a", ">", "</");
std::string surname;
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 224a9768f3..793d99b8fd 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -251,6 +251,11 @@ HANDLE FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
fbu.real_name += surname;
}
+ if (fbu.user_id.find_first_not_of("0123456789") != std::string::npos) {
+ MessageBox(0, TranslateT("Facebook ID must be numeric value."), m_tszUserName, MB_ICONERROR | MB_OK);
+ return NULL;
+ }
+
HANDLE hContact = AddToContactList(&fbu, CONTACT_NONE);
if (hContact) {
if (flags & PALF_TEMPORARY) {