summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/db.h1
-rw-r--r--protocols/FacebookRM/process.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/protocols/FacebookRM/db.h b/protocols/FacebookRM/db.h
index a58904fee5..74233f54f2 100644
--- a/protocols/FacebookRM/db.h
+++ b/protocols/FacebookRM/db.h
@@ -68,6 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FACEBOOK_KEY_TIMEOUTS_LIMIT "TimeoutsLimit" // [HIDDEN]
#define FACEBOOK_KEY_DISABLE_LOGOUT "DisableLogout" // [HIDDEN]
#define FACEBOOK_KEY_VALIDATE_RESPONSE "ValidateResponse" // [HIDDEN] - 0 = standard, 1 = always, 2 = never
+#define FACEBOOK_KEY_LOCAL_TIMESTAMP "UseLocalTimestamp" // [HIDDEN]
#define FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE "EventNotificationsEnable"
#define FACEBOOK_KEY_EVENT_FEEDS_ENABLE "EventFeedsEnable"
diff --git a/protocols/FacebookRM/process.cpp b/protocols/FacebookRM/process.cpp
index f8ffa7e1ce..c369585208 100644
--- a/protocols/FacebookRM/process.cpp
+++ b/protocols/FacebookRM/process.cpp
@@ -418,6 +418,8 @@ void FacebookProto::ProcessMessages( void* data )
p->parse_messages( data, &messages, &notifications );
delete p;
+ bool local_timestamp = getByte(FACEBOOK_KEY_LOCAL_TIMESTAMP, 0) != 0;
+
for(std::vector<facebook_message*>::size_type i=0; i<messages.size( ); i++)
{
if ( messages[i]->user_id != facy.self_.user_id )
@@ -436,7 +438,7 @@ void FacebookProto::ProcessMessages( void* data )
recv.flags = PREF_UTF;
recv.szMessage = const_cast<char*>(messages[i]->message_text.c_str());
- recv.timestamp = messages[i]->time;
+ recv.timestamp = local_timestamp ? ::time(NULL) : messages[i]->time;
ccs.hContact = hContact;
ccs.szProtoService = PSR_MESSAGE;