diff --git a/ChangeLog b/ChangeLog index 64979f20..0552beb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +purple-facebook-5727ffb502c7 (2015-08-21): + - Added missing g_get_real_time() compat function + - Display images and stickers in-line + - Fetch URLs for all message attachments + - Fixed the group checking on NULL buddies + - Fixed memory leak with HTTP error checking + - Ignore canceling HTTP requests + - Minor code refactoring + purple-facebook-7201f07fe8f7 (2015-08-19): - Display the thread URL for videos - Fixed memory leak with contact parsing diff --git a/MANIFEST_VOIDS b/MANIFEST_VOIDS index 429ab3b0..62937f3e 100644 --- a/MANIFEST_VOIDS +++ b/MANIFEST_VOIDS @@ -3,6 +3,8 @@ include/blistnodetypes.h include/buddylist.h include/conversations.h include/conversationtypes.h +include/image.h +include/image-store.h include/message.h include/plugins.h include/presence.h diff --git a/VERSION b/VERSION index 62a98168..c2a13682 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7201f07fe8f7 +5727ffb502c7 diff --git a/include/purple-compat.h b/include/purple-compat.h index fd39642d..8375a1af 100644 --- a/include/purple-compat.h +++ b/include/purple-compat.h @@ -18,9 +18,7 @@ #ifndef _PURPLE_COMPAT_H_ #define _PURPLE_COMPAT_H_ -#include "accountopt.h" -#include "connection.h" -#include "debug.h" +#include "imgstore.h" #include "notify.h" #include "prpl.h" #include "request.h" @@ -39,6 +37,7 @@ struct _PurpleMessage #define PurpleChatConversation PurpleConvChat #define PurpleConversationUpdateType PurpleConvUpdateType +#define PurpleImage void #define PurpleIMConversation PurpleConvIm #define PurpleIMTypingState PurpleTypingState #define PurpleProtocol void @@ -51,6 +50,7 @@ struct _PurpleMessage #define PURPLE_CONVERSATION_UPDATE_UNSEEN PURPLE_CONV_UPDATE_UNSEEN #define PURPLE_IM_NOT_TYPING PURPLE_NOT_TYPING #define PURPLE_IM_TYPING PURPLE_TYPING +#define PURPLE_IMAGE_STORE_PROTOCOL "" #define PURPLE_CHAT_CONVERSATION purple_conversation_get_chat_data #define PURPLE_CONVERSATION(c) ((c)->conv) @@ -113,6 +113,12 @@ struct _PurpleMessage purple_conversation_new(PURPLE_CONV_TYPE_IM, a, n) \ ) +#define purple_image_new_from_data(d, s) \ + GUINT_TO_POINTER(purple_imgstore_add_with_id(d, s, NULL)) + +#define purple_image_store_add_weak(i) \ + GPOINTER_TO_UINT(i) + #define purple_message_new_outgoing(n, t, f) \ ((PurpleMessage *) &((PurpleMessage) {n, t, f})) diff --git a/patches/02-plugin.patch b/patches/02-plugin.patch index e428cd5d..40600861 100644 --- a/patches/02-plugin.patch +++ b/patches/02-plugin.patch @@ -1,7 +1,16 @@ -diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c ---- a/libpurple/protocols/facebook/facebook.c Tue Aug 18 19:58:40 2015 -0400 -+++ b/libpurple/protocols/facebook/facebook.c Tue Aug 18 23:57:23 2015 -0400 -@@ -756,7 +756,7 @@ +diff -r 5727ffb502c7 libpurple/protocols/facebook/facebook.c +--- a/libpurple/protocols/facebook/facebook.c Fri Aug 21 01:18:30 2015 -0400 ++++ b/libpurple/protocols/facebook/facebook.c Fri Aug 21 11:51:33 2015 -0400 +@@ -436,7 +436,7 @@ + id = purple_image_store_add_weak(pimg); + + g_free(msg->text); +- msg->text = g_strdup_printf("text = g_strdup_printf("", id); + msg->flags |= FB_API_MESSAGE_FLAG_DONE; +@@ -815,7 +815,7 @@ GSList *select = NULL; PurpleConnection *gc; @@ -10,7 +19,7 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c return; } -@@ -949,7 +949,7 @@ +@@ -1008,7 +1008,7 @@ PurpleConnection *gc; PurpleMenuAction *act; @@ -19,7 +28,7 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c return NULL; } -@@ -997,7 +997,8 @@ +@@ -1056,7 +1056,8 @@ } static gint @@ -29,7 +38,7 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c { const gchar *name; const gchar *text; -@@ -1006,6 +1007,8 @@ +@@ -1065,6 +1066,8 @@ FbId uid; gchar *sext; @@ -38,7 +47,7 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c fata = purple_connection_get_protocol_data(gc); api = fb_data_get_api(fata); -@@ -1144,7 +1147,8 @@ +@@ -1203,7 +1206,8 @@ } static gint @@ -48,7 +57,7 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c { const gchar *name; const gchar *text; -@@ -1155,6 +1159,8 @@ +@@ -1214,6 +1218,8 @@ PurpleAccount *acct; PurpleChatConversation *chat; @@ -57,7 +66,7 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c acct = purple_connection_get_account(gc); fata = purple_connection_get_protocol_data(gc); api = fb_data_get_api(fata); -@@ -1328,99 +1334,6 @@ +@@ -1387,99 +1393,6 @@ } static void @@ -157,7 +166,7 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c fb_cmds_register(void) { PurpleCmdId id; -@@ -1432,13 +1345,13 @@ +@@ -1491,13 +1404,13 @@ g_return_if_fail(fb_cmds == NULL); id = purple_cmd_register("kick", "s", PURPLE_CMD_P_PROTOCOL, cflags, @@ -173,7 +182,7 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c _("leave: Leave the chat"), NULL); fb_cmds = g_slist_prepend(fb_cmds, GUINT_TO_POINTER(id)); -@@ -1457,43 +1370,102 @@ +@@ -1516,43 +1429,102 @@ g_slist_free_full(fb_cmds, fb_cmds_unregister_free); } @@ -306,9 +315,9 @@ diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.c + inited = TRUE; + return purple_plugin_register(plugin); +} -diff -r 7201f07fe8f7 libpurple/protocols/facebook/facebook.h ---- a/libpurple/protocols/facebook/facebook.h Tue Aug 18 19:58:40 2015 -0400 -+++ b/libpurple/protocols/facebook/facebook.h Tue Aug 18 23:57:23 2015 -0400 +diff -r 5727ffb502c7 libpurple/protocols/facebook/facebook.h +--- a/libpurple/protocols/facebook/facebook.h Fri Aug 21 01:18:30 2015 -0400 ++++ b/libpurple/protocols/facebook/facebook.h Fri Aug 21 11:51:33 2015 -0400 @@ -22,24 +22,8 @@ #ifndef _FACEBOOK_H_ #define _FACEBOOK_H_ diff --git a/patches/03-http-leaks.patch b/patches/03-http-leaks.patch index 5d72fd8a..d3a6dfd0 100644 --- a/patches/03-http-leaks.patch +++ b/patches/03-http-leaks.patch @@ -1,7 +1,7 @@ -diff -r b9aca76e0549 libpurple/http.c ---- a/libpurple/http.c Wed Jun 24 08:52:47 2015 -0400 -+++ b/libpurple/http.c Wed Jun 24 08:59:52 2015 -0400 -@@ -2453,6 +2453,8 @@ +diff -r 5727ffb502c7 libpurple/http.c +--- a/libpurple/http.c Fri Aug 21 01:18:30 2015 -0400 ++++ b/libpurple/http.c Fri Aug 21 11:00:14 2015 -0400 +@@ -2460,6 +2460,8 @@ purple_http_cookie_jar_unref(request->cookie_jar); purple_http_keepalive_pool_unref(request->keepalive_pool); g_free(request->url);