diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index c8e69e91b7..2162ed0021 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -441,12 +441,12 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa if (reader == NULL || time == NULL) continue; - // check if we should use use local_timestamp for unread messages and use it for read time too - bool local_timestamp = proto->getBool(FACEBOOK_KEY_LOCAL_TIMESTAMP_UNREAD, 0); - time_t timestamp = local_timestamp ? ::time(NULL) : utils::time::fix_timestamp(json_as_float(time)); + // check if we should use use local_timestamp for incoming messages and use it for read time too + /*bool local_timestamp = proto->getBool(FACEBOOK_KEY_LOCAL_TIMESTAMP, 0); + time_t timestamp = local_timestamp ? ::time(NULL) : utils::time::fix_timestamp(json_as_float(time));*/ - TCHAR ttime[64]; - _tcsftime(ttime, SIZEOF(ttime), _T("%X"), localtime(×tamp)); + // we can always use NOW for read time, because that's the time of receiving this event (+-) + time_t timestamp = ::time(NULL); JSONNODE *threadid = json_get(it, "tid"); if (threadid != NULL) { // multi user chat @@ -480,6 +480,9 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa st.cbSize = sizeof(st); st.hIcon = Skin_GetIconByHandle(GetIconHandle("read")); + TCHAR ttime[64]; + _tcsftime(ttime, SIZEOF(ttime), _T("%X"), localtime(×tamp)); + mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s by %s"), ttime, readers); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, (LPARAM)&st); |