summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.cpp
diff options
context:
space:
mode:
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