Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fca-unofficial

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fca-unofficial - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

package.json
{
"name": "fca-unofficial",
"version": "1.0.7",
"version": "1.0.8",
"description": "A Facebook chat API that doesn't rely on XMPP. Will NOT be deprecated after April 30th 2015.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -24,23 +24,27 @@ "use strict";

var form = {
color_choice: validatedColor,
thread_or_other_fbid: threadID
dpr: 1,
queries: JSON.stringify({
o0: {
//This doc_id is valid as of January 31, 2020
doc_id: "1727493033983591",
query_params: {
data: {
actor_id: ctx.userID,
client_mutation_id: "0",
source: "SETTINGS",
theme_id: api.threadColors[validatedColor],
thread_id: threadID
}
}
}
})
};
defaultFuncs
.post(
"https://www.facebook.com/messaging/save_thread_color/?source=thread_settings&dpr=1",
ctx.jar,
form
)
.post("https://www.facebook.com/api/graphqlbatch/", ctx.jar, form)
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
.then(function(resData) {
if (resData.error === 1357031) {
throw {
error:
"Trying to change colors of a chat that doesn't exist. Have at least one message in the thread before trying to change the colors."
};
if (resData[resData.length - 1].error_results > 0) {
throw resData[0].o0.errors;
}
if (resData.error) {
throw resData;
}

@@ -47,0 +51,0 @@ return callback();

"use strict";
module.exports = function(defaultFuncs, api, ctx) {
module.exports = function(_defaultFuncs, _api, _ctx) {
// Currently the only colors that can be passed to api.changeThreadColor(); may change if Facebook adds more
return {
MessengerBlue: null,
Viking: "#44bec7",
GoldenPoppy: "#ffc300",
RadicalRed: "#fa3c4c",
Shocking: "#d696bb",
PictonBlue: "#6699cc",
FreeSpeechGreen: "#13cf13",
Pumpkin: "#ff7e29",
LightCoral: "#e68585",
MediumSlateBlue: "#7646ff",
DeepSkyBlue: "#20cef5",
Fern: "#67b868",
Cameo: "#d4a88c",
BrilliantRose: "#ff5ca1",
BilobaFlower: "#a695c7"
////MessengerBlue: null,
////Viking: "#44bec7",
////GoldenPoppy: "#ffc300",
////RadicalRed: "#fa3c4c",
////Shocking: "#d696bb",
////PictonBlue: "#6699cc",
////FreeSpeechGreen: "#13cf13",
////Pumpkin: "#ff7e29",
////LightCoral: "#e68585",
////MediumSlateBlue: "#7646ff",
////DeepSkyBlue: "#20cef5",
////Fern: "#67b868",
////Cameo: "#d4a88c",
////BrilliantRose: "#ff5ca1",
////BilobaFlower: "#a695c7"
DefaultBlue: "196241301102133",
HotPink: "169463077092846",
AquaBlue: "2442142322678320",
BrightPurple: "234137870477637",
CoralPink: "980963458735625",
Orange: "175615189761153",
Green: "2136751179887052",
LavenderPurple: "2058653964378557",
Red: "2129984390566328",
Yellow: "174636906462322",
TealBlue: "1928399724138152",
Aqua: "417639218648241",
Mango: "930060997172551",
Berry: "164535220883264",
Citrus: "370940413392601",
Candy: "205488546921017",
StarWars: "809305022860427"
};
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc