diff options
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/constants.h | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/db.h | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/dialogs.cpp | 6 | ||||
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 34 | ||||
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 5 | ||||
-rw-r--r-- | protocols/FacebookRM/src/resource.h | 5 |
6 files changed, 2 insertions, 54 deletions
diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h index b08c98a102..b890ce140a 100644 --- a/protocols/FacebookRM/src/constants.h +++ b/protocols/FacebookRM/src/constants.h @@ -53,17 +53,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEFAULT_FORCE_HTTPS 0
#define DEFAULT_FORCE_HTTPS_CHANNEL 0
-#define DEFAULT_CLOSE_WINDOWS_ENABLE 0
#define DEFAULT_SET_MIRANDA_STATUS 0
#define DEFAULT_LOGGING_ENABLE 0
#define DEFAULT_SYSTRAY_NOTIFY 0
#define DEFAULT_DISABLE_STATUS_NOTIFY 0
#define DEFAULT_BIG_AVATARS 0
#define DEFAULT_DISCONNECT_CHAT 0
-#define DEFAULT_PARSE_MESSAGES 0
#define DEFAULT_MAP_STATUSES 0
#define DEFAULT_LOAD_MOBILE 0
-#define DEFAULT_ENABLE_GROUPCHATS 0
#define DEFAULT_EVENT_NOTIFICATIONS_ENABLE 1
#define DEFAULT_EVENT_FEEDS_ENABLE 1
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h index 74233f54f2..1cdcf8143b 100644 --- a/protocols/FacebookRM/src/db.h +++ b/protocols/FacebookRM/src/db.h @@ -52,17 +52,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define FACEBOOK_KEY_DEF_GROUP "DefaultGroup"
#define FACEBOOK_KEY_FORCE_HTTPS "ForceHTTPS"
#define FACEBOOK_KEY_FORCE_HTTPS_CHANNEL "ForceHTTPSChannel"
-#define FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE "CloseChatEnable"
#define FACEBOOK_KEY_SET_MIRANDA_STATUS "SetMirandaStatus"
#define FACEBOOK_KEY_LOGGING_ENABLE "LoggingEnable"
#define FACEBOOK_KEY_SYSTRAY_NOTIFY "UseSystrayNotify"
#define FACEBOOK_KEY_DISABLE_STATUS_NOTIFY "DisableStatusNotify"
-#define FACEBOOK_KEY_PARSE_MESSAGES "ParseUnreadMessages"
#define FACEBOOK_KEY_BIG_AVATARS "UseBigAvatars"
#define FACEBOOK_KEY_DISCONNECT_CHAT "DisconnectChatEnable"
#define FACEBOOK_KEY_MAP_STATUSES "MapStatuses"
#define FACEBOOK_KEY_LOAD_MOBILE "LoadMobile"
-#define FACEBOOK_KEY_ENABLE_GROUPCHATS "GroupchatsEnable"
#define FACEBOOK_KEY_POLL_RATE "PollRate" // [HIDDEN]
#define FACEBOOK_KEY_TIMEOUTS_LIMIT "TimeoutsLimit" // [HIDDEN]
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index 935005ab2c..b9c6d6ac6a 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -300,12 +300,9 @@ INT_PTR CALLBACK FBOptionsAdvancedProc( HWND hwnd, UINT message, WPARAM wparam, LoadDBCheckState(proto, hwnd, IDC_SECURE, FACEBOOK_KEY_FORCE_HTTPS, DEFAULT_FORCE_HTTPS);
LoadDBCheckState(proto, hwnd, IDC_SECURE_CHANNEL, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL, DEFAULT_FORCE_HTTPS_CHANNEL);
LoadDBCheckState(proto, hwnd, IDC_DISCONNECT_CHAT, FACEBOOK_KEY_DISCONNECT_CHAT, DEFAULT_DISCONNECT_CHAT);
- LoadDBCheckState(proto, hwnd, IDC_PARSE_UNREAD, FACEBOOK_KEY_PARSE_MESSAGES, DEFAULT_PARSE_MESSAGES);
- LoadDBCheckState(proto, hwnd, IDC_CLOSE_WINDOWS, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE);
LoadDBCheckState(proto, hwnd, IDC_SET_STATUS, FACEBOOK_KEY_SET_MIRANDA_STATUS, DEFAULT_SET_MIRANDA_STATUS);
LoadDBCheckState(proto, hwnd, IDC_LOGGING, FACEBOOK_KEY_LOGGING_ENABLE, DEFAULT_LOGGING_ENABLE);
LoadDBCheckState(proto, hwnd, IDC_MAP_STATUSES, FACEBOOK_KEY_MAP_STATUSES, DEFAULT_MAP_STATUSES);
- LoadDBCheckState(proto, hwnd, IDC_GROUPCHATS, FACEBOOK_KEY_ENABLE_GROUPCHATS, DEFAULT_ENABLE_GROUPCHATS);
EnableWindow(GetDlgItem(hwnd, IDC_SECURE_CHANNEL), IsDlgButtonChecked(hwnd, IDC_SECURE));
@@ -329,13 +326,10 @@ INT_PTR CALLBACK FBOptionsAdvancedProc( HWND hwnd, UINT message, WPARAM wparam, if ( reinterpret_cast<NMHDR*>(lparam)->code == PSN_APPLY )
{
StoreDBCheckState(proto, hwnd, IDC_SECURE, FACEBOOK_KEY_FORCE_HTTPS);
- StoreDBCheckState(proto, hwnd, IDC_CLOSE_WINDOWS, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE);
StoreDBCheckState(proto, hwnd, IDC_LOGGING, FACEBOOK_KEY_LOGGING_ENABLE);
StoreDBCheckState(proto, hwnd, IDC_SECURE_CHANNEL, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL);
StoreDBCheckState(proto, hwnd, IDC_DISCONNECT_CHAT, FACEBOOK_KEY_DISCONNECT_CHAT);
- StoreDBCheckState(proto, hwnd, IDC_PARSE_UNREAD, FACEBOOK_KEY_PARSE_MESSAGES);
StoreDBCheckState(proto, hwnd, IDC_MAP_STATUSES, FACEBOOK_KEY_MAP_STATUSES);
- StoreDBCheckState(proto, hwnd, IDC_GROUPCHATS, FACEBOOK_KEY_ENABLE_GROUPCHATS);
BOOL setStatus = IsDlgButtonChecked(hwnd, IDC_SET_STATUS);
BOOL setStatusOld = DBGetContactSettingByte(NULL, proto->m_szModuleName, FACEBOOK_KEY_SET_MIRANDA_STATUS, DEFAULT_SET_MIRANDA_STATUS);
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index e79c6966cd..2c03c36a7d 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -391,40 +391,6 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess }
}
}
- else if ( type.Value( ) == "group_msg" ) // chat message
- {
- if (!DBGetContactSettingByte(NULL,proto->m_szModuleName,FACEBOOK_KEY_ENABLE_GROUPCHATS, DEFAULT_ENABLE_GROUPCHATS))
- continue;
-
- const String& from_name = objMember["from_name"];
-
- const Number& to = objMember["to"];
- char group_id[32];
- lltoa( to.Value(), group_id, 10 );
-
- const Number& from = objMember["from"];
- char was_id[32];
- lltoa( from.Value(), was_id, 10 );
-
- const Object& messageContent = objMember["msg"];
- const String& text = messageContent["text"];
-
- std::string msg = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( )) );
-
- std::string name = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( from_name.Value( )) );
-
- // Add contact into chat, if isn't there already
- if (!proto->IsChatContact(group_id, was_id))
- proto->AddChatContact(group_id, was_id, name.c_str());
-
- const Number& time_sent = messageContent["time"];
- DWORD timestamp = utils::time::fix_timestamp( time_sent.Value());
-
- // Add message into chat
- proto->UpdateChat(group_id, was_id, name.c_str(), msg.c_str(), timestamp);
- }
else if ( type.Value( ) == "thread_msg" ) // multiuser message
{
const String& from_name = objMember["from_name"];
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 9e962cb100..fb86195c58 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -159,7 +159,7 @@ void FacebookProto::SendTypingWorker(void *p) data += "&to=" + std::string(dbv.pszVal);
data += "&fb_dtsg=" + facy.dtsg_;
data += "&lsd=&phstamp=0&__user=" + facy.self_.user_id;
-
+
http::response resp = facy.flap( FACEBOOK_REQUEST_TYPING_SEND, &data );
DBFreeVariant(&dbv);
@@ -178,8 +178,5 @@ void FacebookProto::MessagingWorker(void *p) if (data->type == FACEBOOK_RECV_MESSAGE)
facy.chat_mark_read( data->user_id );
-// if ( DBGetContactSettingByte(NULL, m_szModuleName, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE ))
-// facy.close_chat( data->user_id );
-
delete data;
}
diff --git a/protocols/FacebookRM/src/resource.h b/protocols/FacebookRM/src/resource.h index 887119bd4b..dae487ee80 100644 --- a/protocols/FacebookRM/src/resource.h +++ b/protocols/FacebookRM/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by facebook.rc
+// Used by Z:\Myranda\trunk\protocols\FacebookRM\res\facebook.rc
//
#define IDI_FACEBOOK 101
#define IDI_MIND 102
@@ -23,12 +23,9 @@ #define IDC_SECURE_CHANNEL 1026
#define IDC_LOGGING 1027
#define IDC_DISCONNECT_CHAT 1028
-#define IDC_PARSE_UNREAD 1029
#define IDC_BIGGER_AVATARS 1030
-#define IDC_CLOSE_WINDOWS 1031
#define IDC_MAP_STATUSES 1032
#define IDC_LOAD_MOBILE 1033
-#define IDC_GROUPCHATS 1034
#define IDC_NOTIFICATIONS_ENABLE 1041
#define IDC_FEEDS_ENABLE 1042
#define IDC_OTHER_ENABLE 1043
|