alicezetion 1.0.8 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"nonce":3803405163793856015,"last_updated":{"seconds":1692340282,"nanos":589070000}}
1
+ {"nonce":1696146174280555217,"last_updated":{"seconds":1692340746,"nanos":363140000}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alicezetion",
3
- "version": "1.0.8",
3
+ "version": "1.1.0",
4
4
  "description": "Artificial labile intelligence cybernated existence",
5
5
  "scripts": {
6
6
  "test": "mocha",
@@ -21,7 +21,7 @@
21
21
  "author": "LeiamNash",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "bluebird": "^3.4.5",
24
+ "bluebird": "^2.11.0",
25
25
  "cheerio": "^1.0.0-rc.12",
26
26
  "https-proxy-agent": "^5.0.1",
27
27
  "mqtt": "^4.3.7",
@@ -30,7 +30,7 @@
30
30
  "websocket-stream": "^5.5.2"
31
31
  },
32
32
  "engines": {
33
- "node": ">=14.x <16.x"
33
+ "node": ">=10.x"
34
34
  },
35
35
  "devDependencies": {
36
36
  "eslint": "latest",
@@ -27,40 +27,46 @@ function formatData(data) {
27
27
  return retObj;
28
28
  }
29
29
 
30
- module.exports = function (defaultFuncs, api, ctx) {
30
+ module.exports = function(defaultFuncs, api, ctx) {
31
31
  return function getUserInfo(id, callback) {
32
- var resolveFunc = function () { };
33
- var rejectFunc = function () { };
32
+ var resolveFunc = function(){};
33
+ var rejectFunc = function(){};
34
34
  var returnPromise = new Promise(function (resolve, reject) {
35
35
  resolveFunc = resolve;
36
36
  rejectFunc = reject;
37
37
  });
38
38
 
39
39
  if (!callback) {
40
- callback = function (err, userInfo) {
41
- if (err) return rejectFunc(err);
42
- resolveFunc(userInfo);
40
+ callback = function (err, friendList) {
41
+ if (err) {
42
+ return rejectFunc(err);
43
+ }
44
+ resolveFunc(friendList);
43
45
  };
44
46
  }
45
47
 
46
- if (utils.getType(id) !== "Array") id = [id];
48
+ if (utils.getType(id) !== "Array") {
49
+ id = [id];
50
+ }
47
51
 
48
52
  var form = {};
49
- id.map(function (v, i) {
53
+ id.map(function(v, i) {
50
54
  form["ids[" + i + "]"] = v;
51
55
  });
52
56
  defaultFuncs
53
57
  .post("https://www.facebook.com/chat/user_info/", ctx.jar, form)
54
58
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
55
- .then(function (resData) {
56
- if (resData.error) throw resData;
59
+ .then(function(resData) {
60
+ if (resData.error) {
61
+ throw resData;
62
+ }
57
63
  return callback(null, formatData(resData.payload.profiles));
58
64
  })
59
- .catch(function (err) {
60
- log.error("getUserInfo", "Can't get user info");
65
+ .catch(function(err) {
66
+ log.error("getUserInfo", err);
61
67
  return callback(err);
62
68
  });
63
69
 
64
70
  return returnPromise;
65
71
  };
66
- };
72
+ };