summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-12-01 09:06:01 +0000
committerRobert Pösel <robyer@seznam.cz>2014-12-01 09:06:01 +0000
commit4a58d85d8dd5f120eb0d0c429e0b46cdeb25c629 (patch)
tree62f758761cd0b8b328e4ae36025b8a798f8ce604 /protocols/FacebookRM/src/proto.cpp
parent14779e590564b1e1057121c1c68979b0df1cad15 (diff)
Facebook: Respect chosen website option for newsfeed links (fixes #843)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11190 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r--protocols/FacebookRM/src/proto.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 9cd807d96c..463b7c1e89 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -817,8 +817,7 @@ void FacebookProto::OpenUrlThread(void *p) {
delete data;
}
-void FacebookProto::OpenUrl(std::string url)
-{
+std::string FacebookProto::PrepareUrl(std::string url) {
std::string::size_type pos = url.find(FACEBOOK_SERVER_DOMAIN);
bool isFacebookUrl = (pos != std::string::npos);
bool isRelativeUrl = (url.substr(0, 4) != "http");
@@ -840,6 +839,12 @@ void FacebookProto::OpenUrl(std::string url)
url = (useHttps ? HTTP_PROTO_SECURE : HTTP_PROTO_REGULAR) + facy.get_server_type() + url;
}
+ return url;
+}
+
+void FacebookProto::OpenUrl(std::string url)
+{
+ url = PrepareUrl(url);
ptrT data( mir_utf8decodeT(url.c_str()));
// Check if there is user defined browser for opening links