From de0c391964f20214bedcffa954c162360675d3b1 Mon Sep 17 00:00:00 2001 From: watcherhd Date: Thu, 15 Mar 2012 16:43:42 +0000 Subject: FacebookRM: version bump # For running plugin is required Miranda 0.9.43 or newer # Plugin is compiled with VS2005 (Fb x86) and a VS2010 (Fb x64) + Added 2 types of newsfeeds: Photos and Links * Reworked options ! Fixed setting to notify different type of newsfeeds ! Fixed and improved parsing newsfeeds ! Fixed getting groupchat messages which contains % ! Fixed not working login ! Improved deleting of contacts + Support for Miranda's EV_PROTO_ONCONTACTDELETED events + Added missing GUID for x64 version and updated user-agent ! Some other minor fixes or improvements ! Fixed item 'Visit Profile' when protocol menus are moved to Main menu * Updated language pack file (for translators) - Disabled option for closing message windows on website (temporary doesnt work) git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@279 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- FacebookRM/process.cpp | 52 +++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'FacebookRM/process.cpp') diff --git a/FacebookRM/process.cpp b/FacebookRM/process.cpp index e3d0192..6f1ea0d 100644 --- a/FacebookRM/process.cpp +++ b/FacebookRM/process.cpp @@ -211,6 +211,7 @@ void FacebookProto::ProcessFriendList( void* data ) bool update_required = true; // TODO RM: remove, because contacts cant change it, so its only for "first run" + // - but what with contacts, that was added after logon? // Update gender if ( DBGetContactSettingByte(hContact, m_szModuleName, "Gender", 0) != fbu->gender ) DBWriteContactSettingByte(hContact, m_szModuleName, "Gender", fbu->gender ); @@ -537,43 +538,46 @@ void FacebookProto::ProcessFeeds( void* data ) std::string::size_type pos = 0; UINT limit = 0; - *resp = utils::text::slashu_to_utf8(*resp); + *resp = utils::text::slashu_to_utf8(*resp); + *resp = utils::text::source_get_value(resp, 2, "\"html\":\"", ">\""); - // TODO RM: first parse against
  • ...
  • ? - while ( ( pos = resp->find( "find( "find( "
    find( "
    find( "<\\/h6", pos ); + pos2 = resp->length(); + + std::string post = resp->substr( pos, pos2 - pos ); + pos += 5; - std::string post_content = resp->substr( pos, pos2 - pos ); - std::string rest_content; + std::string post_header = utils::text::source_get_value(&post, 4, "
    ", "<\\/h6>"); + std::string post_message = utils::text::source_get_value(&post, 3, "
    ", "<\\/h6>"); + std::string post_link = utils::text::source_get_value(&post, 3, "", "<\\/span>"); + std::string post_attach = utils::text::source_get_value(&post, 4, "