--- a/libpurple/protocols/facebook/api.c Thu Oct 10 01:39:27 2019 -0400
+++ b/libpurple/protocols/facebook/api.c Thu Oct 10 02:38:04 2019 -0400
@@ -522,10 +522,8 @@
FbApiPrivate *priv = fb_api_get_instance_private(api);
- priv->cons = soup_session_new();
priv->msgs = g_queue_new();
priv->data = g_hash_table_new_full(g_direct_hash, g_direct_equal,
@@ -1948,7 +1946,7 @@
-fb_api_new(PurpleConnection *gc)
+fb_api_new(PurpleConnection *gc, GProxyResolver *resolver) @@ -1957,6 +1955,8 @@
+ priv->cons = soup_session_new_with_options(SOUP_SESSION_PROXY_RESOLVER, priv->mqtt = fb_mqtt_new(gc);
g_signal_connect(priv->mqtt,
--- a/libpurple/protocols/facebook/api.h Thu Oct 10 01:39:27 2019 -0400
+++ b/libpurple/protocols/facebook/api.h Thu Oct 10 02:38:04 2019 -0400
@@ -551,14 +551,14 @@
* @gc: The #PurpleConnection.
+ * @resolver: The proxy resolver to use from the account. * Creates a new #FbApi. The returned #FbApi should be freed with
* #g_object_unref() when no longer needed.
* Returns: The new #FbApi.
-fb_api_new(PurpleConnection *gc);
+FbApi *fb_api_new(PurpleConnection *gc, GProxyResolver *resolver); --- a/libpurple/protocols/facebook/data.c Thu Oct 10 01:39:27 2019 -0400
+++ b/libpurple/protocols/facebook/data.c Thu Oct 10 02:38:04 2019 -0400
@@ -125,7 +125,6 @@
FbDataPrivate *priv = fb_data_get_instance_private(fata);
- priv->cons = soup_session_new();
priv->msgs = g_queue_new();
priv->imgs = g_hash_table_new_full(g_direct_hash, g_direct_equal,
@@ -167,7 +166,7 @@
-fb_data_new(PurpleConnection *gc)
+fb_data_new(PurpleConnection *gc, GProxyResolver *resolver) @@ -175,7 +174,9 @@
fata = g_object_new(FB_TYPE_DATA, NULL);
- priv->api = fb_api_new(gc);
+ priv->cons = soup_session_new_with_options(SOUP_SESSION_PROXY_RESOLVER, + priv->api = fb_api_new(gc, resolver); --- a/libpurple/protocols/facebook/data.h Thu Oct 10 01:39:27 2019 -0400
+++ b/libpurple/protocols/facebook/data.h Thu Oct 10 02:38:04 2019 -0400
@@ -83,14 +83,14 @@
* @gc: The #PurpleConnection.
+ * @resolver: The proxy resolver to use from the account. * Creates a new #FbData. The returned #FbData should be freed with
* #g_object_unref() when no longer needed.
* Returns: The new #FbData.
-fb_data_new(PurpleConnection *gc);
+FbData *fb_data_new(PurpleConnection *gc, GProxyResolver *resolver); --- a/libpurple/protocols/facebook/facebook.c Thu Oct 10 01:39:27 2019 -0400
+++ b/libpurple/protocols/facebook/facebook.c Thu Oct 10 02:38:04 2019 -0400
@@ -994,10 +994,20 @@
+ GProxyResolver *resolver; gc = purple_account_get_connection(acct);
- fata = fb_data_new(gc);
+ resolver = purple_proxy_get_proxy_resolver(acct, &error); + if (resolver == NULL) { + fb_util_debug_error("Unable to get account proxy resolver: %s", + purple_connection_g_error(gc, error); + fata = fb_data_new(gc, resolver); api = fb_data_get_api(fata);
convh = purple_conversations_get_handle();
purple_connection_set_protocol_data(gc, fata);