summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/contacts.cpp3
-rw-r--r--protocols/FacebookRM/src/db.h2
-rw-r--r--protocols/FacebookRM/src/proto.cpp4
-rw-r--r--protocols/FacebookRM/src/proto.h1
4 files changed, 7 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index 242f0a5bb7..a75d61f58c 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -40,8 +40,7 @@ void FacebookProto::SaveName(MCONTACT hContact, const facebook_user *fbu)
{
if (fbu->type == CONTACT_PAGE) {
// Page has only nickname and no first/last names
- std::string nick = Translate("[Page]"); // page prefix
- nick += " " + fbu->real_name;
+ std::string nick = m_pagePrefix + " " + fbu->real_name;
updateStringUtf(this, hContact, FACEBOOK_KEY_NICK, nick);
delSetting(hContact, FACEBOOK_KEY_FIRST_NAME);
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h
index b9255cb467..b156a6fde5 100644
--- a/protocols/FacebookRM/src/db.h
+++ b/protocols/FacebookRM/src/db.h
@@ -83,7 +83,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FACEBOOK_KEY_NASEEMS_SPAM_MODE "NaseemsSpamMode" // [HIDDEN] - (byte) 1 = don't load messages sent from other instances (e.g., browser) - known as "Naseem's spam mode"
#define FACEBOOK_KEY_OPEN_URL_BROWSER "OpenUrlBrowser" // [HIDDEN] - (unicode) = absolute path to browser to open url links with
#define FACEBOOK_KEY_SEND_MESSAGE_TRIES "SendMessageTries" // [HIDDEN] - (byte) = number of tries to send message, default=1, min=1, max=5
-#define FACEBOOK_KEY_FETCH_MOBILE "FetchMobile" // [HIDDEN] - (byte) 0 = don't fetch mobile contacts (default), 1 = fetch mobile classicaly
+#define FACEBOOK_KEY_PAGE_PREFIX "PagePrefix" // [HIDDEN] - (unicode) = prefix for name of "page" contacts (requires restart to apply)
// Temporary key for login
#define FACEBOOK_KEY_TRIED_DELETING_DEVICE_ID "_TriedDeletingDeviceID" \ No newline at end of file
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index ef882975e0..ed2125bed5 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -47,6 +47,10 @@ FacebookProto::FacebookProto(const char* proto_name, const TCHAR* username) :
if (locale != NULL)
m_locale = locale;
+ // Load custom page prefix, if set
+ ptrT pagePrefix(getTStringA(FACEBOOK_KEY_PAGE_PREFIX));
+ m_pagePrefix = (pagePrefix != NULL) ? _T2A(pagePrefix, CP_UTF8) : "\xF0\x9F\x93\x84"; // emoji :page_facing_up:
+
if (m_tszDefaultGroup == NULL)
m_tszDefaultGroup = mir_tstrdup(_T("Facebook"));
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h
index 3ddbdb44e9..c9d931ed3d 100644
--- a/protocols/FacebookRM/src/proto.h
+++ b/protocols/FacebookRM/src/proto.h
@@ -66,6 +66,7 @@ public:
time_t m_awayTS;
time_t m_pingTS;
std::string m_locale;
+ std::string m_pagePrefix;
// DB utils missing in proto_interface