aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-api.c
diff options
context:
space:
mode:
authorjgeboski <jgeboski@gmail.com>2015-01-23 01:59:10 -0500
committerjgeboski <jgeboski@gmail.com>2015-01-23 01:59:10 -0500
commit43788598338ef276d41040253cb0a903fd1fadb1 (patch)
tree4b42c12228bc433a8819161e70f9b23f123e64df /facebook/facebook-api.c
parenta1a9aa829a419d6b8fb1363688814cb521de32ea (diff)
downloadbitlbee-facebook-43788598338ef276d41040253cb0a903fd1fadb1.tar.gz
bitlbee-facebook-43788598338ef276d41040253cb0a903fd1fadb1.tar.bz2
bitlbee-facebook-43788598338ef276d41040253cb0a903fd1fadb1.tar.xz
facebook-api: removed unused topic subscriptions
This removes certain topic subscriptions which are of no importance to this plugin. This results in the usage of slightly less bandwidth. This also forcibly unsubscribes from the message notifications topic, which seems to cause the connection to die out randomly when messages are sent.
Diffstat (limited to 'facebook/facebook-api.c')
-rw-r--r--facebook/facebook-api.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/facebook/facebook-api.c b/facebook/facebook-api.c
index f1277c8..bc1623d 100644
--- a/facebook/facebook-api.c
+++ b/facebook/facebook-api.c
@@ -354,24 +354,23 @@ static void fb_api_cb_mqtt_connack(fb_mqtt_t *mqtt, gpointer data)
"}", FB_MQTT_KA);
fb_mqtt_subscribe(mqtt,
- "/quick_promotion_refresh", 0,
- "/webrtc", 0,
- "/delete_messages_notification", 0,
- "/orca_message_notifications", 0,
- "/messaging_events", 0,
- "/mercury", 0,
- "/t_rtc", 0,
"/inbox", 0,
+ "/mercury", 0,
+ "/messaging_events", 0,
"/orca_presence", 0,
- "/webrtc_response", 0,
- "/push_notification", 0,
- "/pp", 0,
"/orca_typing_notifications", 0,
+ "/pp", 0,
"/t_ms", 0,
"/t_p", 0,
+ "/t_rtc", 0,
+ "/webrtc", 0,
+ "/webrtc_response", 0,
NULL
);
+ /* Notifications seem to lead to some sort of sending rate limit */
+ fb_mqtt_unsubscribe(mqtt, "/orca_message_notifications", NULL);
+
req = fb_api_req_new(api, FB_API_GHOST, FB_API_PATH_FQL,
fb_api_cb_seqid,
"com.facebook.orca.protocol.methods.u",