node-ainzfb-new 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +61 -63
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -40,7 +40,7 @@ var utils = require("./utils"),
40
40
 
41
41
  var defaultLogRecordSize = 100;
42
42
  log.maxRecordSize = defaultLogRecordSize;
43
-
43
+
44
44
  /!-[ Check File To Run Process ]-!/
45
45
 
46
46
  try {
@@ -92,71 +92,69 @@ var checkVerified = null;
92
92
  /!-[ Function setOptions ]-!/
93
93
 
94
94
  function setOptions(globalOptions, options) {
95
- Object.keys(options).map(function(key) {
96
- switch (key) {
97
- case 'pauseLog':
98
- if (options.pauseLog) log.pause();
99
- break;
100
- case 'online':
101
- globalOptions.online = Boolean(options.online);
102
- break;
103
- case 'logLevel':
104
- log.level = options.logLevel;
105
- globalOptions.logLevel = options.logLevel;
106
- break;
107
- case 'logRecordSize':
108
- log.maxRecordSize = options.logRecordSize;
109
- globalOptions.logRecordSize = options.logRecordSize;
110
- break;
111
- case 'selfListen':
112
- globalOptions.selfListen = Boolean(options.selfListen);
113
- break;
114
- case 'listenEvents':
115
- globalOptions.listenEvents = Boolean(options.listenEvents);
116
- break;
117
- case 'pageID':
118
- globalOptions.pageID = options.pageID.toString();
119
- break;
120
- case 'updatePresence':
121
- globalOptions.updatePresence = Boolean(options.updatePresence);
122
- break;
123
- case 'forceLogin':
124
- globalOptions.forceLogin = Boolean(options.forceLogin);
125
- break;
126
- case 'userAgent':
127
- globalOptions.userAgent = options.userAgent;
128
- break;
129
- case 'autoMarkDelivery':
130
- globalOptions.autoMarkDelivery = Boolean(options.autoMarkDelivery);
131
- break;
132
- case 'autoMarkRead':
133
- globalOptions.autoMarkRead = Boolean(options.autoMarkRead);
134
- break;
135
- case 'listenTyping':
136
- globalOptions.listenTyping = Boolean(options.listenTyping);
137
- break;
138
- case 'proxy':
139
- if (typeof options.proxy != "string") {
140
- delete globalOptions.proxy;
141
- utils.setProxy();
142
- } else {
143
- globalOptions.proxy = options.proxy;
144
- utils.setProxy(globalOptions.proxy);
145
- }
146
- break;
147
- case 'autoReconnect':
148
- globalOptions.autoReconnect = Boolean(options.autoReconnect);
149
- break;
150
- case 'emitReady':
151
- globalOptions.emitReady = Boolean(options.emitReady);
152
- break;
153
- default:
154
- log.warn("setOptions", "Unrecognized option given to setOptions: " + key);
155
- break;
95
+ Object.keys(options).map(function (key) {
96
+ switch (key) {
97
+ case 'online':
98
+ globalOptions.online = Boolean(options.online);
99
+ break;
100
+ case 'logLevel':
101
+ log.level = options.logLevel;
102
+ globalOptions.logLevel = options.logLevel;
103
+ break;
104
+ case 'logRecordSize':
105
+ log.maxRecordSize = options.logRecordSize;
106
+ globalOptions.logRecordSize = options.logRecordSize;
107
+ break;
108
+ case 'selfListen':
109
+ globalOptions.selfListen = Boolean(options.selfListen);
110
+ break;
111
+ case 'listenEvents':
112
+ globalOptions.listenEvents = Boolean(options.listenEvents);
113
+ break;
114
+ case 'pageID':
115
+ globalOptions.pageID = options.pageID.toString();
116
+ break;
117
+ case 'updatePresence':
118
+ globalOptions.updatePresence = Boolean(options.updatePresence);
119
+ break;
120
+ case 'forceLogin':
121
+ globalOptions.forceLogin = Boolean(options.forceLogin);
122
+ break;
123
+ case 'userAgent':
124
+ globalOptions.userAgent = options.userAgent;
125
+ break;
126
+ case 'autoMarkDelivery':
127
+ globalOptions.autoMarkDelivery = Boolean(options.autoMarkDelivery);
128
+ break;
129
+ case 'autoMarkRead':
130
+ globalOptions.autoMarkRead = Boolean(options.autoMarkRead);
131
+ break;
132
+ case 'listenTyping':
133
+ globalOptions.listenTyping = Boolean(options.listenTyping);
134
+ break;
135
+ case 'proxy':
136
+ if (typeof options.proxy != "string") {
137
+ delete globalOptions.proxy;
138
+ utils.setProxy();
139
+ } else {
140
+ globalOptions.proxy = options.proxy;
141
+ utils.setProxy(globalOptions.proxy);
156
142
  }
157
- });
143
+ break;
144
+ case 'autoReconnect':
145
+ globalOptions.autoReconnect = Boolean(options.autoReconnect);
146
+ break;
147
+ case 'emitReady':
148
+ globalOptions.emitReady = Boolean(options.emitReady);
149
+ break;
150
+ default:
151
+ log.warn("setOptions", "Unrecognized option given to setOptions: " + key);
152
+ break;
153
+ }
154
+ });
158
155
  }
159
156
 
157
+
160
158
  /!-[ Function BuildAPI ]-!/
161
159
 
162
160
  async function buildAPI(globalOptions, html, jar) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-ainzfb-new",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "A Facebook chat API that doesn't rely on XMPP. Will NOT be deprecated after April 30th 2015.",
5
5
  "scripts": {
6
6
  "test": "mocha",