fca-unofficial
Advanced tools
Comparing version 1.0.18 to 1.1.0
{ | ||
"name": "fca-unofficial", | ||
"version": "1.0.18", | ||
"version": "1.1.0", | ||
"description": "A Facebook chat API that doesn't rely on XMPP. Will NOT be deprecated after April 30th 2015.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -19,12 +19,17 @@ /* eslint-disable no-redeclare */ | ||
var topics = [ | ||
"/legacy_web", | ||
"/webrtc", | ||
"/rtc_multi", | ||
"/onevc", | ||
"/br_sr", //Notification | ||
//Need to publish /br_sr right after this | ||
"/sr_res", | ||
"/t_ms", | ||
"/thread_typing", | ||
"/orca_typing_notifications", | ||
"/notify_disconnect", | ||
//Need to publish /messenger_sync_create_queue right after this | ||
"/orca_presence", | ||
"/legacy_web", | ||
"/br_sr", | ||
"/sr_res", | ||
"/webrtc", | ||
"/onevc", | ||
"/notify_disconnect", | ||
//Will receive /sr_res right here. | ||
"/inbox", | ||
@@ -535,7 +540,5 @@ "/mercury", | ||
throw { | ||
res: resData, | ||
error: "Returned response is not an array." | ||
} | ||
} else { | ||
log.info("getSeqId", resData); | ||
error: "Not logged in", | ||
res: resData | ||
}; | ||
} | ||
@@ -562,5 +565,9 @@ | ||
var stopListening = function () { | ||
var stopListening = function (callback) { | ||
globalCallback = identity; | ||
mqttClient.end(); | ||
mqttClient.unsubscribe("/webrtc"); | ||
mqttClient.unsubscribe("/rtc_multi", "{}"); | ||
mqttClient.unsubscribe("/onevc", "{}"); | ||
mqttClient.publish("/browser_close", "{}"); | ||
mqttClient.end(true, callback); | ||
}; | ||
@@ -567,0 +574,0 @@ |
538598
6730