node-ainzfb-new 1.6.2909-test → 1.6.2916-test

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/package.json +2 -2
  2. package/src/changeAvt.js +73 -73
  3. package/utils.js +1066 -2273
package/utils.js CHANGED
@@ -10,61 +10,55 @@ var querystring = require("querystring");
10
10
  var url = require("url");
11
11
 
12
12
  function setProxy(url) {
13
- if (typeof url == undefined)
14
- return (request = bluebird.promisify(
15
- require("request").defaults({ jar: true })
16
- ));
17
- return (request = bluebird.promisify(
18
- require("request").defaults({ jar: true, proxy: url })
19
- ));
13
+ if (typeof url == undefined) return request = bluebird.promisify(require("request").defaults({ jar: true }));
14
+ return request = bluebird.promisify(require("request").defaults({ jar: true, proxy: url }));
20
15
  }
21
16
 
22
17
  function getHeaders(url, options, ctx, customHeader) {
23
- var headers = {
24
- "Content-Type": "application/x-www-form-urlencoded",
25
- Referer: "https://www.facebook.com/",
26
- Host: url.replace("https://", "").split("/")[0],
27
- Origin: "https://www.facebook.com",
28
- "User-Agent": options.userAgent,
29
- Connection: "keep-alive",
30
- "sec-fetch-site": "same-origin",
31
- "sec-fetch-mode": "cors"
32
- };
33
- if (customHeader) Object.assign(headers, customHeader);
34
-
35
- if (ctx && ctx.region) headers["X-MSGR-Region"] = ctx.region;
36
-
37
- return headers;
18
+ var headers = {
19
+ "Content-Type": "application/x-www-form-urlencoded",
20
+ Referer: "https://www.facebook.com/",
21
+ Host: url.replace("https://", "").split("/")[0],
22
+ Origin: "https://www.facebook.com",
23
+ "User-Agent": options.userAgent,
24
+ Connection: "keep-alive",
25
+ //"sec-fetch-site": 'same-origin',
26
+ //"sec-fetch-mode": 'cors'
27
+ };
28
+ if (customHeader) Object.assign(headers, customHeader);
29
+
30
+ if (ctx && ctx.region) headers["X-MSGR-Region"] = ctx.region;
31
+
32
+ return headers;
38
33
  }
39
34
 
40
35
  function isReadableStream(obj) {
41
- return (
42
- obj instanceof stream.Stream &&
43
- (getType(obj._read) === "Function" ||
44
- getType(obj._read) === "AsyncFunction") &&
45
- getType(obj._readableState) === "Object"
46
- );
36
+ return (
37
+ obj instanceof stream.Stream &&
38
+ (getType(obj._read) === "Function" ||
39
+ getType(obj._read) === "AsyncFunction") &&
40
+ getType(obj._readableState) === "Object"
41
+ );
47
42
  }
48
43
 
49
44
  function get(url, jar, qs, options, ctx) {
50
- // I'm still confused about this
51
- if (getType(qs) === "Object")
52
- for (var prop in qs)
53
- if (qs.hasOwnProperty(prop) && getType(qs[prop]) === "Object")
54
- qs[prop] = JSON.stringify(qs[prop]);
55
- var op = {
56
- headers: getHeaders(url, options, ctx),
57
- timeout: 60000,
58
- qs: qs,
59
- url: url,
60
- method: "GET",
61
- jar: jar,
62
- gzip: true
63
- };
64
-
65
- return request(op).then(function(res) {
66
- return res[0];
67
- });
45
+ // I'm still confused about this
46
+ if (getType(qs) === "Object")
47
+ for (var prop in qs)
48
+ if (qs.hasOwnProperty(prop) && getType(qs[prop]) === "Object") qs[prop] = JSON.stringify(qs[prop]);
49
+ var op = {
50
+ headers: getHeaders(url, options, ctx),
51
+ timeout: 60000,
52
+ qs: qs,
53
+ url: url,
54
+ method: "GET",
55
+ jar: jar,
56
+ gzip: true
57
+ };
58
+
59
+ return request(op).then(function(res) {
60
+ return res[0];
61
+ });
68
62
  }
69
63
 
70
64
  /*function getv2(url, jar, qs, options, ctx) {
@@ -88,21 +82,21 @@ function get(url, jar, qs, options, ctx) {
88
82
  }*/
89
83
 
90
84
  function post(url, jar, form, options, ctx, customHeader) {
91
- let headers = getHeaders(url, options);
92
- headers["sec-fetch-site"] = "same-origin";
93
- var op = {
94
- headers: headers,
95
- timeout: 60000,
96
- url: url,
97
- method: "POST",
98
- form: form,
99
- jar: jar,
100
- gzip: true
101
- };
102
-
103
- return request(op).then(function(res) {
104
- return res[0];
105
- });
85
+ let headers = getHeaders(url, options);
86
+ headers['sec-fetch-site'] = 'same-origin';
87
+ var op = {
88
+ headers: headers,
89
+ timeout: 60000,
90
+ url: url,
91
+ method: "POST",
92
+ form: form,
93
+ jar: jar,
94
+ gzip: true
95
+ };
96
+
97
+ return request(op).then(function(res) {
98
+ return res[0];
99
+ });
106
100
  }
107
101
 
108
102
  /*function postv2(url, jar, form, options, ctx, customHeader) {
@@ -124,2367 +118,1166 @@ function post(url, jar, form, options, ctx, customHeader) {
124
118
  }*/
125
119
 
126
120
  function postFormData(url, jar, form, qs, options, ctx) {
127
- var headers = getHeaders(url, options, ctx);
128
- headers["Content-Type"] = "multipart/form-data";
129
- var op = {
130
- headers: headers,
131
- timeout: 60000,
132
- url: url,
133
- method: "POST",
134
- formData: form,
135
- qs: qs,
136
- jar: jar,
137
- gzip: true
138
- };
139
-
140
- return request(op).then(function(res) {
141
- return res[0];
142
- });
121
+ var headers = getHeaders(url, options, ctx);
122
+ headers["Content-Type"] = "multipart/form-data";
123
+ var op = {
124
+ headers: headers,
125
+ timeout: 60000,
126
+ url: url,
127
+ method: "POST",
128
+ formData: form,
129
+ qs: qs,
130
+ jar: jar,
131
+ gzip: true
132
+ };
133
+
134
+ return request(op).then(function(res) {
135
+ return res[0];
136
+ });
143
137
  }
144
138
 
145
139
  function padZeros(val, len) {
146
- val = String(val);
147
- len = len || 2;
148
- while (val.length < len) val = "0" + val;
149
- return val;
140
+ val = String(val);
141
+ len = len || 2;
142
+ while (val.length < len) val = "0" + val;
143
+ return val;
150
144
  }
151
145
 
152
146
  function generateThreadingID(clientID) {
153
- var k = Date.now();
154
- var l = Math.floor(Math.random() * 4294967295);
155
- var m = clientID;
156
- return "<" + k + ":" + l + "-" + m + "@mail.projektitan.com>";
147
+ var k = Date.now();
148
+ var l = Math.floor(Math.random() * 4294967295);
149
+ var m = clientID;
150
+ return "<" + k + ":" + l + "-" + m + "@mail.projektitan.com>";
157
151
  }
158
152
 
159
153
  function binaryToDecimal(data) {
160
- var ret = "";
161
- while (data !== "0") {
162
- var end = 0;
163
- var fullName = "";
164
- var i = 0;
165
- for (; i < data.length; i++) {
166
- end = 2 * end + parseInt(data[i], 10);
167
- if (end >= 10) {
168
- fullName += "1";
169
- end -= 10;
170
- } else fullName += "0";
154
+ var ret = "";
155
+ while (data !== "0") {
156
+ var end = 0;
157
+ var fullName = "";
158
+ var i = 0;
159
+ for (; i < data.length; i++) {
160
+ end = 2 * end + parseInt(data[i], 10);
161
+ if (end >= 10) {
162
+ fullName += "1";
163
+ end -= 10;
164
+ } else fullName += "0";
165
+ }
166
+ ret = end.toString() + ret;
167
+ data = fullName.slice(fullName.indexOf("1"));
171
168
  }
172
- ret = end.toString() + ret;
173
- data = fullName.slice(fullName.indexOf("1"));
174
- }
175
- return ret;
169
+ return ret;
176
170
  }
177
171
 
178
172
  function generateOfflineThreadingID() {
179
- var ret = Date.now();
180
- var value = Math.floor(Math.random() * 4294967295);
181
- var str = ("0000000000000000000000" + value.toString(2)).slice(-22);
182
- var msgs = ret.toString(2) + str;
183
- return binaryToDecimal(msgs);
173
+ var ret = Date.now();
174
+ var value = Math.floor(Math.random() * 4294967295);
175
+ var str = ("0000000000000000000000" + value.toString(2)).slice(-22);
176
+ var msgs = ret.toString(2) + str;
177
+ return binaryToDecimal(msgs);
184
178
  }
185
179
 
186
180
  var h;
187
181
  var i = {};
188
182
  var j = {
189
- _: "%",
190
- A: "%2",
191
- B: "000",
192
- C: "%7d",
193
- D: "%7b%22",
194
- E: "%2c%22",
195
- F: "%22%3a",
196
- G: "%2c%22ut%22%3a1",
197
- H: "%2c%22bls%22%3a",
198
- I: "%2c%22n%22%3a%22%",
199
- J: "%22%3a%7b%22i%22%3a0%7d",
200
- K: "%2c%22pt%22%3a0%2c%22vis%22%3a",
201
- L: "%2c%22ch%22%3a%7b%22h%22%3a%22",
202
- M: "%7b%22v%22%3a2%2c%22time%22%3a1",
203
- N: ".channel%22%2c%22sub%22%3a%5b",
204
- O: "%2c%22sb%22%3a1%2c%22t%22%3a%5b",
205
- P: "%2c%22ud%22%3a100%2c%22lc%22%3a0",
206
- Q: "%5d%2c%22f%22%3anull%2c%22uct%22%3a",
207
- R: ".channel%22%2c%22sub%22%3a%5b1%5d",
208
- S: "%22%2c%22m%22%3a0%7d%2c%7b%22i%22%3a",
209
- T: "%2c%22blc%22%3a1%2c%22snd%22%3a1%2c%22ct%22%3a",
210
- U: "%2c%22blc%22%3a0%2c%22snd%22%3a1%2c%22ct%22%3a",
211
- V: "%2c%22blc%22%3a0%2c%22snd%22%3a0%2c%22ct%22%3a",
212
- W: "%2c%22s%22%3a0%2c%22blo%22%3a0%7d%2c%22bl%22%3a%7b%22ac%22%3a",
213
- X: "%2c%22ri%22%3a0%7d%2c%22state%22%3a%7b%22p%22%3a0%2c%22ut%22%3a1",
214
- Y:
215
- "%2c%22pt%22%3a0%2c%22vis%22%3a1%2c%22bls%22%3a0%2c%22blc%22%3a0%2c%22snd%22%3a1%2c%22ct%22%3a",
216
- Z:
217
- "%2c%22sb%22%3a1%2c%22t%22%3a%5b%5d%2c%22f%22%3anull%2c%22uct%22%3a0%2c%22s%22%3a0%2c%22blo%22%3a0%7d%2c%22bl%22%3a%7b%22ac%22%3a"
183
+ _: "%",
184
+ A: "%2",
185
+ B: "000",
186
+ C: "%7d",
187
+ D: "%7b%22",
188
+ E: "%2c%22",
189
+ F: "%22%3a",
190
+ G: "%2c%22ut%22%3a1",
191
+ H: "%2c%22bls%22%3a",
192
+ I: "%2c%22n%22%3a%22%",
193
+ J: "%22%3a%7b%22i%22%3a0%7d",
194
+ K: "%2c%22pt%22%3a0%2c%22vis%22%3a",
195
+ L: "%2c%22ch%22%3a%7b%22h%22%3a%22",
196
+ M: "%7b%22v%22%3a2%2c%22time%22%3a1",
197
+ N: ".channel%22%2c%22sub%22%3a%5b",
198
+ O: "%2c%22sb%22%3a1%2c%22t%22%3a%5b",
199
+ P: "%2c%22ud%22%3a100%2c%22lc%22%3a0",
200
+ Q: "%5d%2c%22f%22%3anull%2c%22uct%22%3a",
201
+ R: ".channel%22%2c%22sub%22%3a%5b1%5d",
202
+ S: "%22%2c%22m%22%3a0%7d%2c%7b%22i%22%3a",
203
+ T: "%2c%22blc%22%3a1%2c%22snd%22%3a1%2c%22ct%22%3a",
204
+ U: "%2c%22blc%22%3a0%2c%22snd%22%3a1%2c%22ct%22%3a",
205
+ V: "%2c%22blc%22%3a0%2c%22snd%22%3a0%2c%22ct%22%3a",
206
+ W: "%2c%22s%22%3a0%2c%22blo%22%3a0%7d%2c%22bl%22%3a%7b%22ac%22%3a",
207
+ X: "%2c%22ri%22%3a0%7d%2c%22state%22%3a%7b%22p%22%3a0%2c%22ut%22%3a1",
208
+ Y: "%2c%22pt%22%3a0%2c%22vis%22%3a1%2c%22bls%22%3a0%2c%22blc%22%3a0%2c%22snd%22%3a1%2c%22ct%22%3a",
209
+ Z: "%2c%22sb%22%3a1%2c%22t%22%3a%5b%5d%2c%22f%22%3anull%2c%22uct%22%3a0%2c%22s%22%3a0%2c%22blo%22%3a0%7d%2c%22bl%22%3a%7b%22ac%22%3a"
218
210
  };
219
211
  (function() {
220
- var l = [];
221
- for (var m in j) {
222
- i[j[m]] = m;
223
- l.push(j[m]);
224
- }
225
- l.reverse();
226
- h = new RegExp(l.join("|"), "g");
212
+ var l = [];
213
+ for (var m in j) {
214
+ i[j[m]] = m;
215
+ l.push(j[m]);
216
+ }
217
+ l.reverse();
218
+ h = new RegExp(l.join("|"), "g");
227
219
  })();
228
220
 
229
221
  function presenceEncode(str) {
230
- return encodeURIComponent(str)
231
- .replace(/([_A-Z])|%../g, function(m, n) {
232
- return n ? "%" + n.charCodeAt(0).toString(16) : m;
233
- })
234
- .toLowerCase()
235
- .replace(h, function(m) {
236
- return i[m];
237
- });
222
+ return encodeURIComponent(str)
223
+ .replace(/([_A-Z])|%../g, function(m, n) {
224
+ return n ? "%" + n.charCodeAt(0).toString(16) : m;
225
+ })
226
+ .toLowerCase()
227
+ .replace(h, function(m) {
228
+ return i[m];
229
+ });
238
230
  }
239
231
 
240
232
  // eslint-disable-next-line no-unused-vars
241
233
  function presenceDecode(str) {
242
- return decodeURIComponent(
243
- str.replace(/[_A-Z]/g, function(m) {
244
- return j[m];
245
- })
246
- );
234
+ return decodeURIComponent(
235
+ str.replace(/[_A-Z]/g, function(m) {
236
+ return j[m];
237
+ })
238
+ );
247
239
  }
248
240
 
249
241
  function generatePresence(userID) {
250
- var time = Date.now();
251
- return (
252
- "E" +
253
- presenceEncode(
254
- JSON.stringify({
255
- v: 3,
256
- time: parseInt(time / 1000, 10),
257
- user: userID,
258
- state: {
259
- ut: 0,
260
- t2: [],
261
- lm2: null,
262
- uct2: time,
263
- tr: null,
264
- tw: Math.floor(Math.random() * 4294967295) + 1,
265
- at: time
266
- },
267
- ch: {
268
- ["p_" + userID]: 0
269
- }
270
- })
271
- )
272
- );
242
+ var time = Date.now();
243
+ return (
244
+ "E" +
245
+ presenceEncode(
246
+ JSON.stringify({
247
+ v: 3,
248
+ time: parseInt(time / 1000, 10),
249
+ user: userID,
250
+ state: {
251
+ ut: 0,
252
+ t2: [],
253
+ lm2: null,
254
+ uct2: time,
255
+ tr: null,
256
+ tw: Math.floor(Math.random() * 4294967295) + 1,
257
+ at: time
258
+ },
259
+ ch: {
260
+ ["p_" + userID]: 0
261
+ }
262
+ })
263
+ )
264
+ );
273
265
  }
274
266
 
275
267
  function generateAccessiblityCookie() {
276
- var time = Date.now();
277
- return encodeURIComponent(
278
- JSON.stringify({
279
- sr: 0,
280
- "sr-ts": time,
281
- jk: 0,
282
- "jk-ts": time,
283
- kb: 0,
284
- "kb-ts": time,
285
- hcm: 0,
286
- "hcm-ts": time
287
- })
288
- );
268
+ var time = Date.now();
269
+ return encodeURIComponent(
270
+ JSON.stringify({
271
+ sr: 0,
272
+ "sr-ts": time,
273
+ jk: 0,
274
+ "jk-ts": time,
275
+ kb: 0,
276
+ "kb-ts": time,
277
+ hcm: 0,
278
+ "hcm-ts": time
279
+ })
280
+ );
289
281
  }
290
282
 
291
283
  function getGUID() {
292
- /** @type {number} */
293
- var sectionLength = Date.now();
294
- /** @type {string} */
295
- var id = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
296
284
  /** @type {number} */
297
- var r = Math.floor((sectionLength + Math.random() * 16) % 16);
298
- /** @type {number} */
299
- sectionLength = Math.floor(sectionLength / 16);
285
+ var sectionLength = Date.now();
300
286
  /** @type {string} */
301
- var _guid = (c == "x" ? r : (r & 7) | 8).toString(16);
302
- return _guid;
303
- });
304
- return id;
287
+ var id = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
288
+ /** @type {number} */
289
+ var r = Math.floor((sectionLength + Math.random() * 16) % 16);
290
+ /** @type {number} */
291
+ sectionLength = Math.floor(sectionLength / 16);
292
+ /** @type {string} */
293
+ var _guid = (c == "x" ? r : (r & 7) | 8).toString(16);
294
+ return _guid;
295
+ });
296
+ return id;
305
297
  }
306
298
 
307
299
  function _formatAttachment(attachment1, attachment2) {
308
- // TODO: THIS IS REALLY BAD
309
- // This is an attempt at fixing Facebook's inconsistencies. Sometimes they give us
310
- // two attachment objects, but sometimes only one. They each contain part of the
311
- // data that you'd want so we merge them for convenience.
312
- // Instead of having a bunch of if statements guarding every access to image_data,
313
- // we set it to empty object and use the fact that it'll return undefined.
314
- attachment2 = attachment2 || { id: "", image_data: {} };
315
- attachment1 = attachment1.mercury ? attachment1.mercury : attachment1;
316
- var blob = attachment1.blob_attachment;
317
- var type =
318
- blob && blob.__typename ? blob.__typename : attachment1.attach_type;
319
- if (!type && attachment1.sticker_attachment) {
320
- type = "StickerAttachment";
321
- blob = attachment1.sticker_attachment;
322
- } else if (!type && attachment1.extensible_attachment) {
323
- if (
324
- attachment1.extensible_attachment.story_attachment &&
325
- attachment1.extensible_attachment.story_attachment.target &&
326
- attachment1.extensible_attachment.story_attachment.target.__typename &&
327
- attachment1.extensible_attachment.story_attachment.target.__typename ===
328
- "MessageLocation"
329
- )
330
- type = "MessageLocation";
331
- else type = "ExtensibleAttachment";
332
-
333
- blob = attachment1.extensible_attachment;
334
- }
335
- // TODO: Determine whether "sticker", "photo", "file" etc are still used
336
- // KEEP IN SYNC WITH getThreadHistory
337
- switch (type) {
338
- case "sticker":
339
- return {
340
- type: "sticker",
341
- ID: attachment1.metadata.stickerID.toString(),
342
- url: attachment1.url,
343
-
344
- packID: attachment1.metadata.packID.toString(),
345
- spriteUrl: attachment1.metadata.spriteURI,
346
- spriteUrl2x: attachment1.metadata.spriteURI2x,
347
- width: attachment1.metadata.width,
348
- height: attachment1.metadata.height,
349
-
350
- caption: attachment2.caption,
351
- description: attachment2.description,
352
-
353
- frameCount: attachment1.metadata.frameCount,
354
- frameRate: attachment1.metadata.frameRate,
355
- framesPerRow: attachment1.metadata.framesPerRow,
356
- framesPerCol: attachment1.metadata.framesPerCol,
357
-
358
- stickerID: attachment1.metadata.stickerID.toString(), // @Legacy
359
- spriteURI: attachment1.metadata.spriteURI, // @Legacy
360
- spriteURI2x: attachment1.metadata.spriteURI2x // @Legacy
361
- };
362
- case "file":
363
- return {
364
- type: "file",
365
- filename: attachment1.name,
366
- ID: attachment2.id.toString(),
367
- url: attachment1.url,
368
-
369
- isMalicious: attachment2.is_malicious,
370
- contentType: attachment2.mime_type,
371
-
372
- name: attachment1.name, // @Legacy
373
- mimeType: attachment2.mime_type, // @Legacy
374
- fileSize: attachment2.file_size // @Legacy
375
- };
376
- case "photo":
377
- return {
378
- type: "photo",
379
- ID: attachment1.metadata.fbid.toString(),
380
- filename: attachment1.fileName,
381
- thumbnailUrl: attachment1.thumbnail_url,
382
-
383
- previewUrl: attachment1.preview_url,
384
- previewWidth: attachment1.preview_width,
385
- previewHeight: attachment1.preview_height,
386
-
387
- largePreviewUrl: attachment1.large_preview_url,
388
- largePreviewWidth: attachment1.large_preview_width,
389
- largePreviewHeight: attachment1.large_preview_height,
390
-
391
- url: attachment1.metadata.url, // @Legacy
392
- width: attachment1.metadata.dimensions.split(",")[0], // @Legacy
393
- height: attachment1.metadata.dimensions.split(",")[1], // @Legacy
394
- name: attachment1.fileName // @Legacy
395
- };
396
- case "animated_image":
397
- return {
398
- type: "animated_image",
399
- ID: attachment2.id.toString(),
400
- filename: attachment2.filename,
401
-
402
- previewUrl: attachment1.preview_url,
403
- previewWidth: attachment1.preview_width,
404
- previewHeight: attachment1.preview_height,
405
-
406
- url: attachment2.image_data.url,
407
- width: attachment2.image_data.width,
408
- height: attachment2.image_data.height,
409
-
410
- name: attachment1.name, // @Legacy
411
- facebookUrl: attachment1.url, // @Legacy
412
- thumbnailUrl: attachment1.thumbnail_url, // @Legacy
413
- mimeType: attachment2.mime_type, // @Legacy
414
- rawGifImage: attachment2.image_data.raw_gif_image, // @Legacy
415
- rawWebpImage: attachment2.image_data.raw_webp_image, // @Legacy
416
- animatedGifUrl: attachment2.image_data.animated_gif_url, // @Legacy
417
- animatedGifPreviewUrl: attachment2.image_data.animated_gif_preview_url, // @Legacy
418
- animatedWebpUrl: attachment2.image_data.animated_webp_url, // @Legacy
419
- animatedWebpPreviewUrl: attachment2.image_data.animated_webp_preview_url // @Legacy
420
- };
421
- case "share":
422
- return {
423
- type: "share",
424
- ID: attachment1.share.share_id.toString(),
425
- url: attachment2.href,
426
-
427
- title: attachment1.share.title,
428
- description: attachment1.share.description,
429
- source: attachment1.share.source,
430
-
431
- image: attachment1.share.media.image,
432
- width: attachment1.share.media.image_size.width,
433
- height: attachment1.share.media.image_size.height,
434
- playable: attachment1.share.media.playable,
435
- duration: attachment1.share.media.duration,
436
-
437
- subattachments: attachment1.share.subattachments,
438
- properties: {},
439
-
440
- animatedImageSize: attachment1.share.media.animated_image_size, // @Legacy
441
- facebookUrl: attachment1.share.uri, // @Legacy
442
- target: attachment1.share.target, // @Legacy
443
- styleList: attachment1.share.style_list // @Legacy
444
- };
445
- case "video":
446
- return {
447
- type: "video",
448
- ID: attachment1.metadata.fbid.toString(),
449
- filename: attachment1.name,
450
-
451
- previewUrl: attachment1.preview_url,
452
- previewWidth: attachment1.preview_width,
453
- previewHeight: attachment1.preview_height,
454
-
455
- url: attachment1.url,
456
- width: attachment1.metadata.dimensions.width,
457
- height: attachment1.metadata.dimensions.height,
458
-
459
- duration: attachment1.metadata.duration,
460
- videoType: "unknown",
461
-
462
- thumbnailUrl: attachment1.thumbnail_url // @Legacy
463
- };
464
- case "error":
465
- return {
466
- type: "error",
467
-
468
- // Save error attachments because we're unsure of their format,
469
- // and whether there are cases they contain something useful for debugging.
470
- attachment1: attachment1,
471
- attachment2: attachment2
472
- };
473
- case "MessageImage":
474
- return {
475
- type: "photo",
476
- ID: blob.legacy_attachment_id,
477
- filename: blob.filename,
478
- thumbnailUrl: blob.thumbnail.uri,
479
-
480
- previewUrl: blob.preview.uri,
481
- previewWidth: blob.preview.width,
482
- previewHeight: blob.preview.height,
483
-
484
- largePreviewUrl: blob.large_preview.uri,
485
- largePreviewWidth: blob.large_preview.width,
486
- largePreviewHeight: blob.large_preview.height,
487
-
488
- url: blob.large_preview.uri, // @Legacy
489
- width: blob.original_dimensions.x, // @Legacy
490
- height: blob.original_dimensions.y, // @Legacy
491
- name: blob.filename // @Legacy
492
- };
493
- case "MessageAnimatedImage":
494
- return {
495
- type: "animated_image",
496
- ID: blob.legacy_attachment_id,
497
- filename: blob.filename,
498
-
499
- previewUrl: blob.preview_image.uri,
500
- previewWidth: blob.preview_image.width,
501
- previewHeight: blob.preview_image.height,
502
-
503
- url: blob.animated_image.uri,
504
- width: blob.animated_image.width,
505
- height: blob.animated_image.height,
506
-
507
- thumbnailUrl: blob.preview_image.uri, // @Legacy
508
- name: blob.filename, // @Legacy
509
- facebookUrl: blob.animated_image.uri, // @Legacy
510
- rawGifImage: blob.animated_image.uri, // @Legacy
511
- animatedGifUrl: blob.animated_image.uri, // @Legacy
512
- animatedGifPreviewUrl: blob.preview_image.uri, // @Legacy
513
- animatedWebpUrl: blob.animated_image.uri, // @Legacy
514
- animatedWebpPreviewUrl: blob.preview_image.uri // @Legacy
515
- };
516
- case "MessageVideo":
517
- return {
518
- type: "video",
519
- filename: blob.filename,
520
- ID: blob.legacy_attachment_id,
521
-
522
- previewUrl: blob.large_image.uri,
523
- previewWidth: blob.large_image.width,
524
- previewHeight: blob.large_image.height,
525
-
526
- url: blob.playable_url,
527
- width: blob.original_dimensions.x,
528
- height: blob.original_dimensions.y,
529
-
530
- duration: blob.playable_duration_in_ms,
531
- videoType: blob.video_type.toLowerCase(),
532
-
533
- thumbnailUrl: blob.large_image.uri // @Legacy
534
- };
535
- case "MessageAudio":
536
- return {
537
- type: "audio",
538
- filename: blob.filename,
539
- ID: blob.url_shimhash,
540
-
541
- audioType: blob.audio_type,
542
- duration: blob.playable_duration_in_ms,
543
- url: blob.playable_url,
544
-
545
- isVoiceMail: blob.is_voicemail
546
- };
547
- case "StickerAttachment":
548
- return {
549
- type: "sticker",
550
- ID: blob.id,
551
- url: blob.url,
552
-
553
- packID: blob.pack ? blob.pack.id : null,
554
- spriteUrl: blob.sprite_image,
555
- spriteUrl2x: blob.sprite_image_2x,
556
- width: blob.width,
557
- height: blob.height,
558
-
559
- caption: blob.label,
560
- description: blob.label,
561
-
562
- frameCount: blob.frame_count,
563
- frameRate: blob.frame_rate,
564
- framesPerRow: blob.frames_per_row,
565
- framesPerCol: blob.frames_per_column,
566
-
567
- stickerID: blob.id, // @Legacy
568
- spriteURI: blob.sprite_image, // @Legacy
569
- spriteURI2x: blob.sprite_image_2x // @Legacy
570
- };
571
- case "MessageLocation":
572
- var urlAttach = blob.story_attachment.url;
573
- var mediaAttach = blob.story_attachment.media;
574
-
575
- var u = querystring.parse(url.parse(urlAttach).query).u;
576
- var where1 = querystring.parse(url.parse(u).query).where1;
577
- var address = where1.split(", ");
578
-
579
- var latitude;
580
- var longitude;
581
-
582
- try {
583
- latitude = Number.parseFloat(address[0]);
584
- longitude = Number.parseFloat(address[1]);
585
- } catch (err) {
586
- /* empty */
587
- }
588
-
589
- var imageUrl;
590
- var width;
591
- var height;
592
-
593
- if (mediaAttach && mediaAttach.image) {
594
- imageUrl = mediaAttach.image.uri;
595
- width = mediaAttach.image.width;
596
- height = mediaAttach.image.height;
597
- }
598
-
599
- return {
600
- type: "location",
601
- ID: blob.legacy_attachment_id,
602
- latitude: latitude,
603
- longitude: longitude,
604
- image: imageUrl,
605
- width: width,
606
- height: height,
607
- url: u || urlAttach,
608
- address: where1,
609
-
610
- facebookUrl: blob.story_attachment.url, // @Legacy
611
- target: blob.story_attachment.target, // @Legacy
612
- styleList: blob.story_attachment.style_list // @Legacy
613
- };
614
- case "ExtensibleAttachment":
615
- return {
616
- type: "share",
617
- ID: blob.legacy_attachment_id,
618
- url: blob.story_attachment.url,
619
-
620
- title: blob.story_attachment.title_with_entities.text,
621
- description:
622
- blob.story_attachment.description &&
623
- blob.story_attachment.description.text,
624
- source: blob.story_attachment.source
625
- ? blob.story_attachment.source.text
626
- : null,
627
-
628
- image:
629
- blob.story_attachment.media &&
630
- blob.story_attachment.media.image &&
631
- blob.story_attachment.media.image.uri,
632
- width:
633
- blob.story_attachment.media &&
634
- blob.story_attachment.media.image &&
635
- blob.story_attachment.media.image.width,
636
- height:
637
- blob.story_attachment.media &&
638
- blob.story_attachment.media.image &&
639
- blob.story_attachment.media.image.height,
640
- playable:
641
- blob.story_attachment.media &&
642
- blob.story_attachment.media.is_playable,
643
- duration:
644
- blob.story_attachment.media &&
645
- blob.story_attachment.media.playable_duration_in_ms,
646
- playableUrl:
647
- blob.story_attachment.media == null
648
- ? null
649
- : blob.story_attachment.media.playable_url,
650
-
651
- subattachments: blob.story_attachment.subattachments,
652
- properties: blob.story_attachment.properties.reduce(function(obj, cur) {
653
- obj[cur.key] = cur.value.text;
654
- return obj;
655
- }, {}),
656
-
657
- facebookUrl: blob.story_attachment.url, // @Legacy
658
- target: blob.story_attachment.target, // @Legacy
659
- styleList: blob.story_attachment.style_list // @Legacy
660
- };
661
- case "MessageFile":
662
- return {
663
- type: "file",
664
- filename: blob.filename,
665
- ID: blob.message_file_fbid,
666
-
667
- url: blob.url,
668
- isMalicious: blob.is_malicious,
669
- contentType: blob.content_type,
670
-
671
- name: blob.filename,
672
- mimeType: "",
673
- fileSize: -1
674
- };
675
- default:
676
- throw new Error(
677
- "unrecognized attach_file of type " +
678
- type +
679
- "`" +
680
- JSON.stringify(attachment1, null, 4) +
681
- " attachment2: " +
682
- JSON.stringify(attachment2, null, 4) +
683
- "`"
684
- );
685
- }
300
+ // TODO: THIS IS REALLY BAD
301
+ // This is an attempt at fixing Facebook's inconsistencies. Sometimes they give us
302
+ // two attachment objects, but sometimes only one. They each contain part of the
303
+ // data that you'd want so we merge them for convenience.
304
+ // Instead of having a bunch of if statements guarding every access to image_data,
305
+ // we set it to empty object and use the fact that it'll return undefined.
306
+ attachment2 = attachment2 || { id: "", image_data: {} };
307
+ attachment1 = attachment1.mercury ? attachment1.mercury : attachment1;
308
+ var blob = attachment1.blob_attachment;
309
+ var type =
310
+ blob && blob.__typename ? blob.__typename : attachment1.attach_type;
311
+ if (!type && attachment1.sticker_attachment) {
312
+ type = "StickerAttachment";
313
+ blob = attachment1.sticker_attachment;
314
+ } else if (!type && attachment1.extensible_attachment) {
315
+ if (
316
+ attachment1.extensible_attachment.story_attachment &&
317
+ attachment1.extensible_attachment.story_attachment.target &&
318
+ attachment1.extensible_attachment.story_attachment.target.__typename &&
319
+ attachment1.extensible_attachment.story_attachment.target.__typename === "MessageLocation"
320
+ ) type = "MessageLocation";
321
+ else type = "ExtensibleAttachment";
322
+
323
+ blob = attachment1.extensible_attachment;
324
+ }
325
+ // TODO: Determine whether "sticker", "photo", "file" etc are still used
326
+ // KEEP IN SYNC WITH getThreadHistory
327
+ switch (type) {
328
+ case "sticker":
329
+ return {
330
+ type: "sticker",
331
+ ID: attachment1.metadata.stickerID.toString(),
332
+ url: attachment1.url,
333
+
334
+ packID: attachment1.metadata.packID.toString(),
335
+ spriteUrl: attachment1.metadata.spriteURI,
336
+ spriteUrl2x: attachment1.metadata.spriteURI2x,
337
+ width: attachment1.metadata.width,
338
+ height: attachment1.metadata.height,
339
+
340
+ caption: attachment2.caption,
341
+ description: attachment2.description,
342
+
343
+ frameCount: attachment1.metadata.frameCount,
344
+ frameRate: attachment1.metadata.frameRate,
345
+ framesPerRow: attachment1.metadata.framesPerRow,
346
+ framesPerCol: attachment1.metadata.framesPerCol,
347
+
348
+ stickerID: attachment1.metadata.stickerID.toString(), // @Legacy
349
+ spriteURI: attachment1.metadata.spriteURI, // @Legacy
350
+ spriteURI2x: attachment1.metadata.spriteURI2x // @Legacy
351
+ };
352
+ case "file":
353
+ return {
354
+ type: "file",
355
+ filename: attachment1.name,
356
+ ID: attachment2.id.toString(),
357
+ url: attachment1.url,
358
+
359
+ isMalicious: attachment2.is_malicious,
360
+ contentType: attachment2.mime_type,
361
+
362
+ name: attachment1.name, // @Legacy
363
+ mimeType: attachment2.mime_type, // @Legacy
364
+ fileSize: attachment2.file_size // @Legacy
365
+ };
366
+ case "photo":
367
+ return {
368
+ type: "photo",
369
+ ID: attachment1.metadata.fbid.toString(),
370
+ filename: attachment1.fileName,
371
+ thumbnailUrl: attachment1.thumbnail_url,
372
+
373
+ previewUrl: attachment1.preview_url,
374
+ previewWidth: attachment1.preview_width,
375
+ previewHeight: attachment1.preview_height,
376
+
377
+ largePreviewUrl: attachment1.large_preview_url,
378
+ largePreviewWidth: attachment1.large_preview_width,
379
+ largePreviewHeight: attachment1.large_preview_height,
380
+
381
+ url: attachment1.metadata.url, // @Legacy
382
+ width: attachment1.metadata.dimensions.split(",")[0], // @Legacy
383
+ height: attachment1.metadata.dimensions.split(",")[1], // @Legacy
384
+ name: attachment1.fileName // @Legacy
385
+ };
386
+ case "animated_image":
387
+ return {
388
+ type: "animated_image",
389
+ ID: attachment2.id.toString(),
390
+ filename: attachment2.filename,
391
+
392
+ previewUrl: attachment1.preview_url,
393
+ previewWidth: attachment1.preview_width,
394
+ previewHeight: attachment1.preview_height,
395
+
396
+ url: attachment2.image_data.url,
397
+ width: attachment2.image_data.width,
398
+ height: attachment2.image_data.height,
399
+
400
+ name: attachment1.name, // @Legacy
401
+ facebookUrl: attachment1.url, // @Legacy
402
+ thumbnailUrl: attachment1.thumbnail_url, // @Legacy
403
+ mimeType: attachment2.mime_type, // @Legacy
404
+ rawGifImage: attachment2.image_data.raw_gif_image, // @Legacy
405
+ rawWebpImage: attachment2.image_data.raw_webp_image, // @Legacy
406
+ animatedGifUrl: attachment2.image_data.animated_gif_url, // @Legacy
407
+ animatedGifPreviewUrl: attachment2.image_data.animated_gif_preview_url, // @Legacy
408
+ animatedWebpUrl: attachment2.image_data.animated_webp_url, // @Legacy
409
+ animatedWebpPreviewUrl: attachment2.image_data.animated_webp_preview_url // @Legacy
410
+ };
411
+ case "share":
412
+ return {
413
+ type: "share",
414
+ ID: attachment1.share.share_id.toString(),
415
+ url: attachment2.href,
416
+
417
+ title: attachment1.share.title,
418
+ description: attachment1.share.description,
419
+ source: attachment1.share.source,
420
+
421
+ image: attachment1.share.media.image,
422
+ width: attachment1.share.media.image_size.width,
423
+ height: attachment1.share.media.image_size.height,
424
+ playable: attachment1.share.media.playable,
425
+ duration: attachment1.share.media.duration,
426
+
427
+ subattachments: attachment1.share.subattachments,
428
+ properties: {},
429
+
430
+ animatedImageSize: attachment1.share.media.animated_image_size, // @Legacy
431
+ facebookUrl: attachment1.share.uri, // @Legacy
432
+ target: attachment1.share.target, // @Legacy
433
+ styleList: attachment1.share.style_list // @Legacy
434
+ };
435
+ case "video":
436
+ return {
437
+ type: "video",
438
+ ID: attachment1.metadata.fbid.toString(),
439
+ filename: attachment1.name,
440
+
441
+ previewUrl: attachment1.preview_url,
442
+ previewWidth: attachment1.preview_width,
443
+ previewHeight: attachment1.preview_height,
444
+
445
+ url: attachment1.url,
446
+ width: attachment1.metadata.dimensions.width,
447
+ height: attachment1.metadata.dimensions.height,
448
+
449
+ duration: attachment1.metadata.duration,
450
+ videoType: "unknown",
451
+
452
+ thumbnailUrl: attachment1.thumbnail_url // @Legacy
453
+ };
454
+ case "error":
455
+ return {
456
+ type: "error",
457
+
458
+ // Save error attachments because we're unsure of their format,
459
+ // and whether there are cases they contain something useful for debugging.
460
+ attachment1: attachment1,
461
+ attachment2: attachment2
462
+ };
463
+ case "MessageImage":
464
+ return {
465
+ type: "photo",
466
+ ID: blob.legacy_attachment_id,
467
+ filename: blob.filename,
468
+ thumbnailUrl: blob.thumbnail.uri,
469
+
470
+ previewUrl: blob.preview.uri,
471
+ previewWidth: blob.preview.width,
472
+ previewHeight: blob.preview.height,
473
+
474
+ largePreviewUrl: blob.large_preview.uri,
475
+ largePreviewWidth: blob.large_preview.width,
476
+ largePreviewHeight: blob.large_preview.height,
477
+
478
+ url: blob.large_preview.uri, // @Legacy
479
+ width: blob.original_dimensions.x, // @Legacy
480
+ height: blob.original_dimensions.y, // @Legacy
481
+ name: blob.filename // @Legacy
482
+ };
483
+ case "MessageAnimatedImage":
484
+ return {
485
+ type: "animated_image",
486
+ ID: blob.legacy_attachment_id,
487
+ filename: blob.filename,
488
+
489
+ previewUrl: blob.preview_image.uri,
490
+ previewWidth: blob.preview_image.width,
491
+ previewHeight: blob.preview_image.height,
492
+
493
+ url: blob.animated_image.uri,
494
+ width: blob.animated_image.width,
495
+ height: blob.animated_image.height,
496
+
497
+ thumbnailUrl: blob.preview_image.uri, // @Legacy
498
+ name: blob.filename, // @Legacy
499
+ facebookUrl: blob.animated_image.uri, // @Legacy
500
+ rawGifImage: blob.animated_image.uri, // @Legacy
501
+ animatedGifUrl: blob.animated_image.uri, // @Legacy
502
+ animatedGifPreviewUrl: blob.preview_image.uri, // @Legacy
503
+ animatedWebpUrl: blob.animated_image.uri, // @Legacy
504
+ animatedWebpPreviewUrl: blob.preview_image.uri // @Legacy
505
+ };
506
+ case "MessageVideo":
507
+ return {
508
+ type: "video",
509
+ filename: blob.filename,
510
+ ID: blob.legacy_attachment_id,
511
+
512
+ previewUrl: blob.large_image.uri,
513
+ previewWidth: blob.large_image.width,
514
+ previewHeight: blob.large_image.height,
515
+
516
+ url: blob.playable_url,
517
+ width: blob.original_dimensions.x,
518
+ height: blob.original_dimensions.y,
519
+
520
+ duration: blob.playable_duration_in_ms,
521
+ videoType: blob.video_type.toLowerCase(),
522
+
523
+ thumbnailUrl: blob.large_image.uri // @Legacy
524
+ };
525
+ case "MessageAudio":
526
+ return {
527
+ type: "audio",
528
+ filename: blob.filename,
529
+ ID: blob.url_shimhash,
530
+
531
+ audioType: blob.audio_type,
532
+ duration: blob.playable_duration_in_ms,
533
+ url: blob.playable_url,
534
+
535
+ isVoiceMail: blob.is_voicemail
536
+ };
537
+ case "StickerAttachment":
538
+ return {
539
+ type: "sticker",
540
+ ID: blob.id,
541
+ url: blob.url,
542
+
543
+ packID: blob.pack ? blob.pack.id : null,
544
+ spriteUrl: blob.sprite_image,
545
+ spriteUrl2x: blob.sprite_image_2x,
546
+ width: blob.width,
547
+ height: blob.height,
548
+
549
+ caption: blob.label,
550
+ description: blob.label,
551
+
552
+ frameCount: blob.frame_count,
553
+ frameRate: blob.frame_rate,
554
+ framesPerRow: blob.frames_per_row,
555
+ framesPerCol: blob.frames_per_column,
556
+
557
+ stickerID: blob.id, // @Legacy
558
+ spriteURI: blob.sprite_image, // @Legacy
559
+ spriteURI2x: blob.sprite_image_2x // @Legacy
560
+ };
561
+ case "MessageLocation":
562
+ var urlAttach = blob.story_attachment.url;
563
+ var mediaAttach = blob.story_attachment.media;
564
+
565
+ var u = querystring.parse(url.parse(urlAttach).query).u;
566
+ var where1 = querystring.parse(url.parse(u).query).where1;
567
+ var address = where1.split(", ");
568
+
569
+ var latitude;
570
+ var longitude;
571
+
572
+ try {
573
+ latitude = Number.parseFloat(address[0]);
574
+ longitude = Number.parseFloat(address[1]);
575
+ } catch (err) {
576
+ /* empty */
577
+ }
578
+
579
+ var imageUrl;
580
+ var width;
581
+ var height;
582
+
583
+ if (mediaAttach && mediaAttach.image) {
584
+ imageUrl = mediaAttach.image.uri;
585
+ width = mediaAttach.image.width;
586
+ height = mediaAttach.image.height;
587
+ }
588
+
589
+ return {
590
+ type: "location",
591
+ ID: blob.legacy_attachment_id,
592
+ latitude: latitude,
593
+ longitude: longitude,
594
+ image: imageUrl,
595
+ width: width,
596
+ height: height,
597
+ url: u || urlAttach,
598
+ address: where1,
599
+
600
+ facebookUrl: blob.story_attachment.url, // @Legacy
601
+ target: blob.story_attachment.target, // @Legacy
602
+ styleList: blob.story_attachment.style_list // @Legacy
603
+ };
604
+ case "ExtensibleAttachment":
605
+ return {
606
+ type: "share",
607
+ ID: blob.legacy_attachment_id,
608
+ url: blob.story_attachment.url,
609
+
610
+ title: blob.story_attachment.title_with_entities.text,
611
+ description: blob.story_attachment.description &&
612
+ blob.story_attachment.description.text,
613
+ source: blob.story_attachment.source ? blob.story_attachment.source.text : null,
614
+
615
+ image: blob.story_attachment.media &&
616
+ blob.story_attachment.media.image &&
617
+ blob.story_attachment.media.image.uri,
618
+ width: blob.story_attachment.media &&
619
+ blob.story_attachment.media.image &&
620
+ blob.story_attachment.media.image.width,
621
+ height: blob.story_attachment.media &&
622
+ blob.story_attachment.media.image &&
623
+ blob.story_attachment.media.image.height,
624
+ playable: blob.story_attachment.media &&
625
+ blob.story_attachment.media.is_playable,
626
+ duration: blob.story_attachment.media &&
627
+ blob.story_attachment.media.playable_duration_in_ms,
628
+ playableUrl: blob.story_attachment.media == null ? null : blob.story_attachment.media.playable_url,
629
+
630
+ subattachments: blob.story_attachment.subattachments,
631
+ properties: blob.story_attachment.properties.reduce(function(obj, cur) {
632
+ obj[cur.key] = cur.value.text;
633
+ return obj;
634
+ }, {}),
635
+
636
+ facebookUrl: blob.story_attachment.url, // @Legacy
637
+ target: blob.story_attachment.target, // @Legacy
638
+ styleList: blob.story_attachment.style_list // @Legacy
639
+ };
640
+ case "MessageFile":
641
+ return {
642
+ type: "file",
643
+ filename: blob.filename,
644
+ ID: blob.message_file_fbid,
645
+
646
+ url: blob.url,
647
+ isMalicious: blob.is_malicious,
648
+ contentType: blob.content_type,
649
+
650
+ name: blob.filename,
651
+ mimeType: "",
652
+ fileSize: -1
653
+ };
654
+ default:
655
+ throw new Error(
656
+ "unrecognized attach_file of type " +
657
+ type +
658
+ "`" +
659
+ JSON.stringify(attachment1, null, 4) +
660
+ " attachment2: " +
661
+ JSON.stringify(attachment2, null, 4) +
662
+ "`"
663
+ );
664
+ }
686
665
  }
687
666
 
688
667
  function formatAttachment(attachments, attachmentIds, attachmentMap, shareMap) {
689
- attachmentMap = shareMap || attachmentMap;
690
- return attachments
691
- ? attachments.map(function(val, i) {
692
- if (
693
- !attachmentMap ||
694
- !attachmentIds ||
695
- !attachmentMap[attachmentIds[i]]
696
- ) {
697
- return _formatAttachment(val);
698
- }
699
- return _formatAttachment(val, attachmentMap[attachmentIds[i]]);
700
- })
701
- : [];
668
+ attachmentMap = shareMap || attachmentMap;
669
+ return attachments ?
670
+ attachments.map(function(val, i) {
671
+ if (!attachmentMap ||
672
+ !attachmentIds ||
673
+ !attachmentMap[attachmentIds[i]]
674
+ ) {
675
+ return _formatAttachment(val);
676
+ }
677
+ return _formatAttachment(val, attachmentMap[attachmentIds[i]]);
678
+ }) : [];
702
679
  }
703
680
 
704
681
  function formatDeltaMessage(m) {
705
- var md = m.delta.messageMetadata;
706
- var mdata =
707
- m.delta.data === undefined
708
- ? []
709
- : m.delta.data.prng === undefined ? [] : JSON.parse(m.delta.data.prng);
710
- var m_id = mdata.map(u => u.i);
711
- var m_offset = mdata.map(u => u.o);
712
- var m_length = mdata.map(u => u.l);
713
- var mentions = {};
714
- var body = m.delta.body || "";
715
- var args = body == "" ? [] : body.trim().split(/\s+/);
716
- for (var i = 0; i < m_id.length; i++)
717
- mentions[m_id[i]] = m.delta.body.substring(
718
- m_offset[i],
719
- m_offset[i] + m_length[i]
720
- );
721
-
722
- return {
723
- type: "message",
724
- senderID: formatID(md.actorFbId.toString()),
725
- threadID: formatID(
726
- (md.threadKey.threadFbId || md.threadKey.otherUserFbId).toString()
727
- ),
728
- messageID: md.messageId,
729
- args: args,
730
- body: body,
731
- attachments: (m.delta.attachments || []).map(v => _formatAttachment(v)),
732
- mentions: mentions,
733
- timestamp: md.timestamp,
734
- isGroup: !!md.threadKey.threadFbId,
735
- participantIDs: m.delta.participants || []
736
- };
682
+ var md = m.delta.messageMetadata;
683
+ var mdata =
684
+ m.delta.data === undefined ? [] :
685
+ m.delta.data.prng === undefined ? [] :
686
+ JSON.parse(m.delta.data.prng);
687
+ var m_id = mdata.map(u => u.i);
688
+ var m_offset = mdata.map(u => u.o);
689
+ var m_length = mdata.map(u => u.l);
690
+ var mentions = {};
691
+ var body = m.delta.body || "";
692
+ var args = body == "" ? [] : body.trim().split(/\s+/);
693
+ for (var i = 0; i < m_id.length; i++) mentions[m_id[i]] = m.delta.body.substring(m_offset[i], m_offset[i] + m_length[i]);
694
+
695
+ return {
696
+ type: "message",
697
+ senderID: formatID(md.actorFbId.toString()),
698
+ threadID: formatID((md.threadKey.threadFbId || md.threadKey.otherUserFbId).toString()),
699
+ messageID: md.messageId,
700
+ args: args,
701
+ body: body,
702
+ attachments: (m.delta.attachments || []).map(v => _formatAttachment(v)),
703
+ mentions: mentions,
704
+ timestamp: md.timestamp,
705
+ isGroup: !!md.threadKey.threadFbId,
706
+ participantIDs: m.delta.participants || []
707
+ };
737
708
  }
738
709
 
739
710
  function formatID(id) {
740
- if (id != undefined && id != null) return id.replace(/(fb)?id[:.]/, "");
741
- else return id;
711
+ if (id != undefined && id != null) return id.replace(/(fb)?id[:.]/, "");
712
+ else return id;
742
713
  }
743
714
 
744
715
  function formatMessage(m) {
745
- var originalMessage = m.message ? m.message : m;
746
- var obj = {
747
- type: "message",
748
- senderName: originalMessage.sender_name,
749
- senderID: formatID(originalMessage.sender_fbid.toString()),
750
- participantNames: originalMessage.group_thread_info
751
- ? originalMessage.group_thread_info.participant_names
752
- : [originalMessage.sender_name.split(" ")[0]],
753
- participantIDs: originalMessage.group_thread_info
754
- ? originalMessage.group_thread_info.participant_ids.map(function(v) {
755
- return formatID(v.toString());
756
- })
757
- : [formatID(originalMessage.sender_fbid)],
758
- body: originalMessage.body || "",
759
- threadID: formatID(
760
- (
761
- originalMessage.thread_fbid || originalMessage.other_user_fbid
762
- ).toString()
763
- ),
764
- threadName: originalMessage.group_thread_info
765
- ? originalMessage.group_thread_info.name
766
- : originalMessage.sender_name,
767
- location: originalMessage.coordinates ? originalMessage.coordinates : null,
768
- messageID: originalMessage.mid
769
- ? originalMessage.mid.toString()
770
- : originalMessage.message_id,
771
- attachments: formatAttachment(
772
- originalMessage.attachments,
773
- originalMessage.attachmentIds,
774
- originalMessage.attachment_map,
775
- originalMessage.share_map
776
- ),
777
- timestamp: originalMessage.timestamp,
778
- timestampAbsolute: originalMessage.timestamp_absolute,
779
- timestampRelative: originalMessage.timestamp_relative,
780
- timestampDatetime: originalMessage.timestamp_datetime,
781
- tags: originalMessage.tags,
782
- reactions: originalMessage.reactions ? originalMessage.reactions : [],
783
- isUnread: originalMessage.is_unread
784
- };
785
-
786
- if (m.type === "pages_messaging")
787
- obj.pageID = m.realtime_viewer_fbid.toString();
788
- obj.isGroup = obj.participantIDs.length > 2;
789
-
790
- return obj;
716
+ var originalMessage = m.message ? m.message : m;
717
+ var obj = {
718
+ type: "message",
719
+ senderName: originalMessage.sender_name,
720
+ senderID: formatID(originalMessage.sender_fbid.toString()),
721
+ participantNames: originalMessage.group_thread_info ? originalMessage.group_thread_info.participant_names : [originalMessage.sender_name.split(" ")[0]],
722
+ participantIDs: originalMessage.group_thread_info ?
723
+ originalMessage.group_thread_info.participant_ids.map(function(v) {
724
+ return formatID(v.toString());
725
+ }) : [formatID(originalMessage.sender_fbid)],
726
+ body: originalMessage.body || "",
727
+ threadID: formatID((originalMessage.thread_fbid || originalMessage.other_user_fbid).toString()),
728
+ threadName: originalMessage.group_thread_info ? originalMessage.group_thread_info.name : originalMessage.sender_name,
729
+ location: originalMessage.coordinates ? originalMessage.coordinates : null,
730
+ messageID: originalMessage.mid ? originalMessage.mid.toString() : originalMessage.message_id,
731
+ attachments: formatAttachment(
732
+ originalMessage.attachments,
733
+ originalMessage.attachmentIds,
734
+ originalMessage.attachment_map,
735
+ originalMessage.share_map
736
+ ),
737
+ timestamp: originalMessage.timestamp,
738
+ timestampAbsolute: originalMessage.timestamp_absolute,
739
+ timestampRelative: originalMessage.timestamp_relative,
740
+ timestampDatetime: originalMessage.timestamp_datetime,
741
+ tags: originalMessage.tags,
742
+ reactions: originalMessage.reactions ? originalMessage.reactions : [],
743
+ isUnread: originalMessage.is_unread
744
+ };
745
+
746
+ if (m.type === "pages_messaging") obj.pageID = m.realtime_viewer_fbid.toString();
747
+ obj.isGroup = obj.participantIDs.length > 2;
748
+
749
+ return obj;
791
750
  }
792
751
 
793
752
  function formatEvent(m) {
794
- var originalMessage = m.message ? m.message : m;
795
- var logMessageType = originalMessage.log_message_type;
796
- var logMessageData;
797
- if (logMessageType === "log:generic-admin-text") {
798
- logMessageData = originalMessage.log_message_data.untypedData;
799
- logMessageType = getAdminTextMessageType(
800
- originalMessage.log_message_data.message_type
801
- );
802
- } else logMessageData = originalMessage.log_message_data;
803
-
804
- return Object.assign(formatMessage(originalMessage), {
805
- type: "event",
806
- logMessageType: logMessageType,
807
- logMessageData: logMessageData,
808
- logMessageBody: originalMessage.log_message_body
809
- });
753
+ var originalMessage = m.message ? m.message : m;
754
+ var logMessageType = originalMessage.log_message_type;
755
+ var logMessageData;
756
+ if (logMessageType === "log:generic-admin-text") {
757
+ logMessageData = originalMessage.log_message_data.untypedData;
758
+ logMessageType = getAdminTextMessageType(originalMessage.log_message_data.message_type);
759
+ } else logMessageData = originalMessage.log_message_data;
760
+
761
+ return Object.assign(formatMessage(originalMessage), {
762
+ type: "event",
763
+ logMessageType: logMessageType,
764
+ logMessageData: logMessageData,
765
+ logMessageBody: originalMessage.log_message_body
766
+ });
810
767
  }
811
768
 
812
769
  function formatHistoryMessage(m) {
813
- switch (m.action_type) {
814
- case "ma-type:log-message":
815
- return formatEvent(m);
816
- default:
817
- return formatMessage(m);
818
- }
770
+ switch (m.action_type) {
771
+ case "ma-type:log-message":
772
+ return formatEvent(m);
773
+ default:
774
+ return formatMessage(m);
775
+ }
819
776
  }
820
777
 
821
778
  // Get a more readable message type for AdminTextMessages
822
779
  function getAdminTextMessageType(m) {
823
- switch (m.type) {
824
- case "change_thread_theme":
825
- return "log:thread-color";
826
- case "change_thread_icon":
827
- return "log:thread-icon";
828
- case "change_thread_nickname":
829
- return "log:user-nickname";
830
- case "change_thread_admins":
831
- return "log:thread-admins";
832
- case "group_poll":
833
- return "log:thread-poll";
834
- case "change_thread_approval_mode":
835
- return "log:thread-approval-mode";
836
- case "messenger_call_log":
837
- case "participant_joined_group_call":
838
- return "log:thread-call";
839
- }
780
+ switch (m.type) {
781
+ case "change_thread_theme":
782
+ return "log:thread-color";
783
+ case "change_thread_icon":
784
+ return "log:thread-icon";
785
+ case "change_thread_nickname":
786
+ return "log:user-nickname";
787
+ case "change_thread_admins":
788
+ return "log:thread-admins";
789
+ case "group_poll":
790
+ return "log:thread-poll";
791
+ case "change_thread_approval_mode":
792
+ return "log:thread-approval-mode";
793
+ case "messenger_call_log":
794
+ case "participant_joined_group_call":
795
+ return "log:thread-call";
796
+ }
840
797
  }
841
798
 
842
799
  function formatDeltaEvent(m) {
843
- var { updateData, getData, hasData } = require("./Extra/ExtraGetThread");
844
- var Database = require("./Extra/Database/index");
845
- var logMessageType;
846
- var logMessageData;
847
-
848
- // log:thread-color => {theme_color}
849
- // log:user-nickname => {participant_id, nickname}
850
- // log:thread-icon => {thread_icon}
851
- // log:thread-name => {name}
852
- // log:subscribe => {addedParticipants - [Array]}
853
- //log:unsubscribe => {leftParticipantFbId}
854
-
855
- switch (m.class) {
856
- case "AdminTextMessage":
857
- logMessageType = getAdminTextMessageType(m);
858
- logMessageData = m.untypedData;
859
- break;
860
- case "ThreadName":
861
- logMessageType = "log:thread-name";
862
- logMessageData = { name: m.name };
863
- break;
864
- case "ParticipantsAddedToGroupThread":
865
- logMessageType = "log:subscribe";
866
- logMessageData = { addedParticipants: m.addedParticipants };
867
- break;
868
- case "ParticipantLeftGroupThread":
869
- logMessageType = "log:unsubscribe";
870
- logMessageData = { leftParticipantFbId: m.leftParticipantFbId };
871
- break;
872
- }
873
-
874
- function swdwdfoo(fca, foo) {
875
- const fzz = swdwdfca();
876
- return (
877
- (swdwdfoo = function(gtgtgtg, fsswd) {
878
- gtgtgtg = gtgtgtg - (0xf * -0x179 + -0x1a39 + 0x31ba);
879
- let sqsq = fzz[gtgtgtg];
880
- return sqsq;
881
- }),
882
- swdwdfoo(fca, foo)
883
- );
884
- }
885
- function swdwdfca() {
886
- const gtgTGtG = [
887
- "color",
888
- "Premi",
889
- "emoji",
890
- "vefsr0u",
891
- "valMo",
892
- "appro",
893
- "ntu1oty3mNnmsvzzDa",
894
- "T_ID",
895
- "log:s",
896
- "AhjLywq",
897
- "Aw5N",
898
- "vxnLCKy",
899
- "parti",
900
- "dmin",
901
- "BgvUz3q",
902
- "nickn",
903
- "ywrHDge",
904
- "DeLeCW",
905
- "ywrKx2e",
906
- "C2vYlw4",
907
- "mZu2ntK4t2Lzvw1h",
908
- "yxj0Awm",
909
- "n2DrtLfJBG",
910
- "ywrTAw4",
911
- "DxnLCKy",
912
- "log:u",
913
- "admin",
914
- "FbId",
915
- "_colo",
916
- "zw1VAMK",
917
- "zv9Hzg0",
918
- "userI",
919
- "get",
920
- "y29SB3i",
921
- "UserF",
922
- "userF",
923
- "AwnRBMe",
924
- "remov",
925
- "Dg9tDhi",
926
- "lw5HBwu",
927
- "\x20log:",
928
- "ame",
929
- "7gQNQcn",
930
- "BMLJA24",
931
- "messa",
932
- "find",
933
- "some",
934
- "BwvZC2e",
935
- "DxnLCKK",
936
- "z2vnzxq",
937
- "AwjL",
938
- "bId",
939
- "lwnVBg8",
940
- "d_ico",
941
- "5559672sLIVYt",
942
- "hread",
943
- "threa",
944
- "-admi",
945
- "4116888CpBnpE",
946
- "B3rOzxi",
947
- "-appr",
948
- "DgHLBwu",
949
- "x0vwru4",
950
- "490609ArPCSu",
951
- "surZ",
952
- "AxbHBNq",
953
- "dKey",
954
- "dFbId",
955
- "d-ico",
956
- "BMfTzq",
957
- "DgHYzwe",
958
- "Bw9Kzq",
959
- "30CXZFBM",
960
- "BMzV",
961
- "ze5HBwu",
962
- "mty4otu1mfvXsMnVCa",
963
- "nfo",
964
- "DwjZy3i",
965
- "nsubs",
966
- "y2LWyw4",
967
- "zezIswq",
968
- "Bg9NoNu",
969
- "tIDs",
970
- "toStr",
971
- "geMet",
972
- "cribe",
973
- "umKey",
974
- "yKLK",
975
- "name",
976
- "mZjPA2rPvKO",
977
- "yw1LCW",
978
- "Bg9NoNq",
979
- "1097512zYphxV",
980
- "log:t",
981
- "IDs",
982
- "TARGE",
983
- "Df9Pza",
984
- "ugfYDgK",
985
- "ndeXnJG4oenWqM5Wrq",
986
- "mZbdwfPgqK0",
987
- "other",
988
- "zMLSDgu",
989
- "has",
990
- "cipan",
991
- "ing",
992
- "leftP",
993
- "ndKWnJa5qxjqq1n1",
994
- "2087955xMzAtx",
995
- "_emoj",
996
- "adata",
997
- "mJa4nZK1nxHnEKf0Ea",
998
- "push",
999
- "added",
1000
- "zNvSBe4",
1001
- "ChvZAa",
1002
- "zeTLEq",
1003
- "Dw1lzxK",
1004
- "oval-",
1005
- "qurnsu4"
1006
- ];
1007
- swdwdfca = function() {
1008
- return gtgTGtG;
1009
- };
1010
- return swdwdfca();
1011
- }
1012
- function swdwdfzz(fca, foo) {
1013
- const fzz = swdwdfca();
1014
- return (
1015
- (swdwdfzz = function(gtgtgtg, fsswd) {
1016
- gtgtgtg = gtgtgtg - (0xf * -0x179 + -0x1a39 + 0x31ba);
1017
- let sqsq = fzz[gtgtgtg];
1018
- if (swdwdfzz["bygXuO"] === undefined) {
1019
- var sasdefe = function(Foo) {
1020
- const Fzz =
1021
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=";
1022
- let Sasdefe = "",
1023
- Ww = "";
1024
- for (
1025
- let Fca = -0x1da2 + -0x20e0 + 0x12 * 0x379,
1026
- Fsswd,
1027
- sQsq,
1028
- fOo = 0x39a + -0x2216 + 0x1e7c;
1029
- (sQsq = Foo["charAt"](fOo++));
1030
- ~sQsq &&
1031
- ((Fsswd =
1032
- Fca % (-0x1bbd + 0x744 + -0x419 * -0x5)
1033
- ? Fsswd * (-0xaed * -0x3 + 0xff5 * -0x1 + -0x1092) + sQsq
1034
- : sQsq),
1035
- Fca++ % (-0x4ca + -0x70c + -0x2 * -0x5ed))
1036
- ? (Sasdefe += String["fromCharCode"](
1037
- (0x32 * 0x4f + 0x1087 * -0x1 + 0x1 * 0x218) &
1038
- (Fsswd >>
1039
- ((-(0x1f23 + -0x20e4 + 0x1c3) * Fca) &
1040
- (0x25f4 + 0xfd6 + -0x35c4)))
1041
- ))
1042
- : -0x1721 + -0x9 * 0x1eb + 0xdc * 0x2f
1043
- ) {
1044
- sQsq = Fzz["indexOf"](sQsq);
1045
- }
1046
- for (
1047
- let sAsdefe = 0x1e2a + 0x1a43 + -0x386d, fZz = Sasdefe["length"];
1048
- sAsdefe < fZz;
1049
- sAsdefe++
1050
- ) {
1051
- Ww +=
1052
- "%" +
1053
- ("00" +
1054
- Sasdefe["charCodeAt"](sAsdefe)["toString"](
1055
- -0x1251 * -0x1 + 0x2289 + 0x1d * -0x1d2
1056
- ))["slice"](-(0x1 * 0x393 + -0x406 + 0x75));
1057
- }
1058
- return decodeURIComponent(Ww);
1059
- };
1060
- (swdwdfzz["FyjGAz"] = sasdefe),
1061
- (fca = arguments),
1062
- (swdwdfzz["bygXuO"] = !![]);
1063
- }
1064
- const ww = fzz[0x3d * -0x4c + -0xfa9 * -0x1 + 0x273],
1065
- Sqsq = gtgtgtg + ww,
1066
- Gtgtgtg = fca[Sqsq];
1067
- return (
1068
- !Gtgtgtg
1069
- ? ((sqsq = swdwdfzz["FyjGAz"](sqsq)), (fca[Sqsq] = sqsq))
1070
- : (sqsq = Gtgtgtg),
1071
- sqsq
1072
- );
1073
- }),
1074
- swdwdfzz(fca, foo)
1075
- );
1076
- }
1077
- function swdwdSAsdEfE(gTGtGtG, sASdEfE, GTGtGtG, SASdEfE, sasDEfE) {
1078
- return swdwdfzz(SASdEfE - 0x49, sASdEfE);
1079
- }
1080
- function swdwdsAsdEfE(GTgtGtG, saSdEfE, gtGtGtG, GtGtGtG, SaSdEfE) {
1081
- return swdwdfoo(SaSdEfE - 0x1e3, GtGtGtG);
1082
- }
1083
- (function(sAsDefE, gTgTgtG) {
1084
- function saSDefE(GtGTgtG, sASDefE, gTGTgtG, GTGTgtG, SASDefE) {
1085
- return swdwdfoo(sASDefE - 0x28a, GtGTgtG);
1086
- }
1087
- function SaSDefE(sasdEfE, gtgtGtG, GtgtGtG, SasdEfE, gTgtGtG) {
1088
- return swdwdfzz(sasdEfE - -0x256, gTgtGtG);
1089
- }
1090
- const SAsDefE = sAsDefE();
1091
- while (!![]) {
1092
- try {
1093
- const GTgTgtG =
1094
- parseInt(saSDefE(0x402, 0x426, 0x421, 0x458, 0x454)) /
1095
- (0x3 * 0x43e + -0x9f7 * 0x1 + -0x2c2) +
1096
- -parseInt(saSDefE(0x437, 0x443, 0x43a, 0x471, 0x41d)) /
1097
- (-0x13 * 0xb0 + -0x1887 + 0x2599) +
1098
- parseInt(SaSDefE(-0xe5, -0x114, -0xad, -0xae, -0x10c)) /
1099
- (0xa24 + 0x69 * -0x11 + -0x65 * 0x8) *
1100
- (parseInt(SaSDefE(-0xa0, -0x70, -0x65, -0xcd, -0xa4)) /
1101
- (0xa85 * -0x3 + -0x720 + -0x1 * -0x26b3)) +
1102
- parseInt(SaSDefE(-0xae, -0x73, -0xaf, -0x75, -0xd2)) /
1103
- (-0x1 * 0x9e3 + -0x7d5 + -0x11bd * -0x1) +
1104
- parseInt(SaSDefE(-0x7c, -0x4d, -0x51, -0x72, -0x61)) /
1105
- (0x2553 + -0x6 * 0x275 + -0x168f) *
1106
- (-parseInt(saSDefE(0x43e, 0x411, 0x3db, 0x41e, 0x42e)) /
1107
- (-0x1 * -0x1565 + 0x174 * -0x3 + 0x137 * -0xe)) +
1108
- -parseInt(saSDefE(0x3f9, 0x421, 0x408, 0x432, 0x407)) /
1109
- (-0xc2 * -0x22 + -0x10 * 0x1a1 + -0xe * -0x6) +
1110
- parseInt(saSDefE(0x42f, 0x452, 0x48a, 0x429, 0x448)) /
1111
- (0xf1 * -0x2 + -0xedb * -0x1 + -0x33c * 0x4) *
1112
- (parseInt(saSDefE(0x43c, 0x42f, 0x444, 0x431, 0x436)) /
1113
- (-0x1 * -0x1c3d + 0x179 + -0xed6 * 0x2));
1114
- if (GTgTgtG === gTgTgtG) break;
1115
- else SAsDefE["push"](SAsDefE["shift"]());
1116
- } catch (gtGTgtG) {
1117
- SAsDefE["push"](SAsDefE["shift"]());
1118
- }
1119
- }
1120
- })(swdwdfca, 0xe0b96 + 0xcff79 + -0x13a2c2);
1121
- if (
1122
- Database[swdwdsAsdEfE(0x3ce, 0x3c4, 0x3d6, 0x399, 0x3a6)](
1123
- swdwdsAsdEfE(0x3f4, 0x384, 0x3a6, 0x3e8, 0x3b8) +
1124
- swdwdSAsdEfE(0x23e, 0x204, 0x1fd, 0x21a, 0x203)
1125
- ) &&
1126
- Database[swdwdsAsdEfE(0x36c, 0x36e, 0x39b, 0x361, 0x360)](
1127
- swdwdsAsdEfE(0x3b4, 0x390, 0x3ec, 0x3ce, 0x3b8) +
1128
- swdwdsAsdEfE(0x36e, 0x3a3, 0x39c, 0x377, 0x396)
1129
- ) != "" &&
1130
- Database[swdwdsAsdEfE(0x3af, 0x3d6, 0x376, 0x3df, 0x3a6)](
1131
- swdwdsAsdEfE(0x3bb, 0x387, 0x398, 0x3d7, 0x3b8) + "um"
1132
- ) &&
1133
- Database[swdwdsAsdEfE(0x36e, 0x368, 0x379, 0x36d, 0x360)](
1134
- swdwdsAsdEfE(0x3e8, 0x3a3, 0x3b8, 0x39a, 0x3b8) + "um"
1135
- ) == !![]
1136
- )
1137
- switch (hasData(
1138
- formatID(
1139
- (m[
1140
- swdwdSAsdEfE(0x20d, 0x1f5, 0x1cf, 0x1d5, 0x1ab) +
1141
- swdwdSAsdEfE(0x1dd, 0x1dc, 0x1e3, 0x1d7, 0x213) +
1142
- swdwdSAsdEfE(0x17f, 0x1b8, 0x17e, 0x1b6, 0x1dd)
1143
- ][
1144
- swdwdsAsdEfE(0x352, 0x3a4, 0x3a5, 0x38f, 0x378) +
1145
- swdwdSAsdEfE(0x1f3, 0x1ff, 0x227, 0x219, 0x24d)
1146
- ][
1147
- swdwdSAsdEfE(0x221, 0x201, 0x1b5, 0x1ec, 0x1e1) +
1148
- swdwdsAsdEfE(0x398, 0x360, 0x35d, 0x35b, 0x383)
1149
- ] ||
1150
- m[
1151
- swdwdsAsdEfE(0x36b, 0x384, 0x39a, 0x34d, 0x36c) +
1152
- swdwdsAsdEfE(0x390, 0x3ae, 0x382, 0x392, 0x394) +
1153
- swdwdSAsdEfE(0x1b7, 0x195, 0x19c, 0x1b6, 0x1e8)
1154
- ][
1155
- swdwdSAsdEfE(0x1d6, 0x1cb, 0x1ea, 0x1ec, 0x1d5) +
1156
- swdwdSAsdEfE(0x1e7, 0x1e6, 0x1fc, 0x219, 0x209)
1157
- ][
1158
- swdwdSAsdEfE(0x1cf, 0x1d3, 0x1b0, 0x1e1, 0x1aa) +
1159
- swdwdsAsdEfE(0x350, 0x350, 0x33d, 0x33f, 0x362) +
1160
- swdwdsAsdEfE(0x361, 0x363, 0x35b, 0x388, 0x373)
1161
- ])[
1162
- swdwdSAsdEfE(0x19d, 0x1ba, 0x1d4, 0x1cc, 0x1cb) +
1163
- swdwdSAsdEfE(0x202, 0x216, 0x261, 0x227, 0x25b)
1164
- ]()
1165
- )
1166
- )) {
1167
- case !![]: {
1168
- switch (logMessageType) {
1169
- case swdwdsAsdEfE(0x3b9, 0x392, 0x3a1, 0x3ca, 0x39d) +
1170
- swdwdSAsdEfE(0x23e, 0x208, 0x1fe, 0x226, 0x260) +
1171
- swdwdSAsdEfE(0x1a4, 0x210, 0x1e1, 0x1da, 0x1cf) +
1172
- "r":
1173
- {
1174
- let swdwdsasdefE = getData(
1175
- formatID(
1176
- (m[
1177
- swdwdsAsdEfE(0x342, 0x38b, 0x34a, 0x397, 0x36c) +
1178
- swdwdsAsdEfE(0x38a, 0x3b5, 0x370, 0x3ad, 0x394) +
1179
- swdwdsAsdEfE(0x3e5, 0x391, 0x3d3, 0x3b1, 0x3ad)
1180
- ][
1181
- swdwdsAsdEfE(0x347, 0x382, 0x382, 0x382, 0x378) +
1182
- swdwdsAsdEfE(0x3b1, 0x36a, 0x37a, 0x384, 0x382)
1183
- ][
1184
- swdwdSAsdEfE(0x20a, 0x20c, 0x219, 0x1ec, 0x1b5) +
1185
- swdwdSAsdEfE(0x224, 0x203, 0x22a, 0x1f6, 0x225)
1186
- ] ||
1187
- m[
1188
- swdwdsAsdEfE(0x37a, 0x33f, 0x344, 0x35f, 0x36c) +
1189
- swdwdSAsdEfE(0x1b4, 0x1ae, 0x1e2, 0x1d7, 0x1f0) +
1190
- swdwdSAsdEfE(0x1d7, 0x1b2, 0x19b, 0x1b6, 0x1ed)
1191
- ][
1192
- swdwdSAsdEfE(0x1dc, 0x1c3, 0x1db, 0x1ec, 0x1e8) +
1193
- swdwdsAsdEfE(0x370, 0x3ac, 0x392, 0x368, 0x382)
1194
- ][
1195
- swdwdSAsdEfE(0x1ba, 0x206, 0x1c3, 0x1e1, 0x1bb) +
1196
- swdwdsAsdEfE(0x388, 0x365, 0x382, 0x367, 0x362) +
1197
- swdwdsAsdEfE(0x39d, 0x360, 0x36a, 0x35f, 0x373)
1198
- ])[
1199
- swdwdSAsdEfE(0x1f2, 0x1a6, 0x1a8, 0x1cc, 0x1ed) +
1200
- swdwdsAsdEfE(0x389, 0x3c9, 0x383, 0x3e4, 0x3a8)
1201
- ]()
1202
- )
1203
- );
1204
- (swdwdsasdefE[swdwdSAsdEfE(0x1e5, 0x1e6, 0x1bf, 0x1c3, 0x1e4)] =
1205
- logMessageData[
1206
- swdwdSAsdEfE(0x1b4, 0x1f8, 0x1c7, 0x1e3, 0x1f0) +
1207
- swdwdsAsdEfE(0x3e5, 0x377, 0x37f, 0x3cd, 0x3ac) +
1208
- "i"
1209
- ] ||
1210
- swdwdsasdefE[swdwdSAsdEfE(0x1d0, 0x1ca, 0x19d, 0x1c3, 0x1d7)]),
1211
- (swdwdsasdefE[swdwdSAsdEfE(0x1cc, 0x1bd, 0x1a5, 0x1c7, 0x1fe)] =
1212
- logMessageData[
1213
- swdwdSAsdEfE(0x1fc, 0x20c, 0x1e7, 0x1e3, 0x1d5) +
1214
- swdwdsAsdEfE(0x327, 0x394, 0x329, 0x336, 0x35c) +
1215
- "r"
1216
- ] ||
1217
- swdwdsasdefE[
1218
- swdwdsAsdEfE(0x3c1, 0x3da, 0x39a, 0x3f1, 0x3b7)
1219
- ]),
1220
- updateData(
1221
- formatID(
1222
- (m[
1223
- swdwdsAsdEfE(0x373, 0x373, 0x3a6, 0x34c, 0x36c) +
1224
- swdwdsAsdEfE(0x3c2, 0x38e, 0x359, 0x360, 0x394) +
1225
- swdwdsAsdEfE(0x3c8, 0x3a0, 0x3c8, 0x3db, 0x3ad)
1226
- ][
1227
- swdwdSAsdEfE(0x1ea, 0x21f, 0x1e8, 0x1ec, 0x1db) +
1228
- swdwdSAsdEfE(0x254, 0x223, 0x254, 0x219, 0x212)
1229
- ][
1230
- swdwdsAsdEfE(0x3ac, 0x365, 0x343, 0x386, 0x378) +
1231
- swdwdsAsdEfE(0x3ae, 0x391, 0x39f, 0x392, 0x383)
1232
- ] ||
1233
- m[
1234
- swdwdsAsdEfE(0x371, 0x340, 0x387, 0x333, 0x36c) +
1235
- swdwdsAsdEfE(0x3c4, 0x365, 0x3b8, 0x371, 0x394) +
1236
- swdwdSAsdEfE(0x1e0, 0x1f1, 0x195, 0x1b6, 0x1a7)
1237
- ][
1238
- swdwdSAsdEfE(0x1b3, 0x1b4, 0x21f, 0x1ec, 0x1ed) +
1239
- swdwdsAsdEfE(0x387, 0x3ad, 0x34e, 0x397, 0x382)
1240
- ][
1241
- swdwdsAsdEfE(0x3a9, 0x397, 0x38e, 0x3b9, 0x3a4) +
1242
- swdwdsAsdEfE(0x333, 0x393, 0x36a, 0x372, 0x362) +
1243
- swdwdSAsdEfE(0x217, 0x204, 0x229, 0x1fd, 0x206)
1244
- ])[
1245
- swdwdsAsdEfE(0x3b2, 0x388, 0x3b0, 0x361, 0x393) +
1246
- swdwdsAsdEfE(0x3b1, 0x398, 0x3e3, 0x38c, 0x3a8)
1247
- ]()
1248
- ),
1249
- swdwdsasdefE
1250
- );
1251
- }
800
+ var { updateData,getData,hasData } = require('./Extra/ExtraGetThread');
801
+ var Database = require('./Extra/Database/index')
802
+ var logMessageType;
803
+ var logMessageData;
804
+
805
+ // log:thread-color => {theme_color}
806
+ // log:user-nickname => {participant_id, nickname}
807
+ // log:thread-icon => {thread_icon}
808
+ // log:thread-name => {name}
809
+ // log:subscribe => {addedParticipants - [Array]}
810
+ //log:unsubscribe => {leftParticipantFbId}
811
+
812
+ switch (m.class) {
813
+ case "AdminTextMessage":
814
+ logMessageType = getAdminTextMessageType(m);
815
+ logMessageData = m.untypedData;
1252
816
  break;
1253
- case swdwdsAsdEfE(0x38d, 0x3a0, 0x35e, 0x37d, 0x368) +
1254
- swdwdsAsdEfE(0x35e, 0x385, 0x39f, 0x392, 0x378) +
1255
- swdwdsAsdEfE(0x35b, 0x378, 0x35f, 0x365, 0x384) +
1256
- "n":
1257
- {
1258
- let swdwdGtgtgtG = getData(
1259
- formatID(
1260
- (m[
1261
- swdwdsAsdEfE(0x38a, 0x367, 0x393, 0x355, 0x36c) +
1262
- swdwdSAsdEfE(0x1a9, 0x1dc, 0x1c3, 0x1d7, 0x1ad) +
1263
- swdwdsAsdEfE(0x373, 0x3d5, 0x39e, 0x3b2, 0x3ad)
1264
- ][
1265
- swdwdsAsdEfE(0x377, 0x38b, 0x375, 0x36f, 0x378) +
1266
- swdwdsAsdEfE(0x397, 0x3b2, 0x3a5, 0x3b3, 0x382)
1267
- ][
1268
- swdwdSAsdEfE(0x1b1, 0x1c8, 0x20b, 0x1ec, 0x1c6) +
1269
- swdwdsAsdEfE(0x372, 0x363, 0x3a1, 0x35b, 0x383)
1270
- ] ||
1271
- m[
1272
- swdwdSAsdEfE(0x1ce, 0x1db, 0x1e9, 0x1d5, 0x1f9) +
1273
- swdwdsAsdEfE(0x372, 0x365, 0x3b8, 0x3bb, 0x394) +
1274
- swdwdsAsdEfE(0x3a4, 0x3e4, 0x3e8, 0x3c7, 0x3ad)
1275
- ][
1276
- swdwdsAsdEfE(0x379, 0x340, 0x343, 0x362, 0x378) +
1277
- swdwdsAsdEfE(0x35e, 0x35c, 0x3bd, 0x364, 0x382)
1278
- ][
1279
- swdwdSAsdEfE(0x206, 0x1bc, 0x1f2, 0x1e1, 0x1fd) +
1280
- swdwdSAsdEfE(0x248, 0x253, 0x238, 0x228, 0x21d) +
1281
- swdwdSAsdEfE(0x20f, 0x22e, 0x230, 0x1fd, 0x224)
1282
- ])[
1283
- swdwdsAsdEfE(0x3c8, 0x3c0, 0x3c8, 0x3ae, 0x393) +
1284
- swdwdsAsdEfE(0x3df, 0x39b, 0x3df, 0x3de, 0x3a8)
1285
- ]()
1286
- )
1287
- );
1288
- (swdwdGtgtgtG[swdwdSAsdEfE(0x1ad, 0x199, 0x1a3, 0x1c3, 0x1a4)] =
1289
- logMessageData[
1290
- swdwdSAsdEfE(0x1c5, 0x1c4, 0x221, 0x1ec, 0x1e7) +
1291
- swdwdsAsdEfE(0x375, 0x39e, 0x389, 0x374, 0x375) +
1292
- "n"
1293
- ] ||
1294
- swdwdGtgtgtG[swdwdsAsdEfE(0x38c, 0x3aa, 0x37f, 0x3bd, 0x3b9)]),
1295
- updateData(
1296
- formatID(
1297
- (m[
1298
- swdwdsAsdEfE(0x364, 0x38f, 0x382, 0x332, 0x36c) +
1299
- swdwdSAsdEfE(0x19e, 0x1cc, 0x1ce, 0x1d7, 0x20f) +
1300
- swdwdSAsdEfE(0x1d5, 0x1c1, 0x1aa, 0x1b6, 0x1c0)
1301
- ][
1302
- swdwdSAsdEfE(0x20f, 0x1ca, 0x1b4, 0x1ec, 0x1d9) +
1303
- swdwdsAsdEfE(0x361, 0x3a5, 0x3ad, 0x35e, 0x382)
1304
- ][
1305
- swdwdSAsdEfE(0x1df, 0x1cd, 0x211, 0x1ec, 0x1ec) +
1306
- swdwdSAsdEfE(0x1ed, 0x1c8, 0x1d9, 0x1f6, 0x210)
1307
- ] ||
1308
- m[
1309
- swdwdSAsdEfE(0x19f, 0x1f2, 0x1f3, 0x1d5, 0x1e1) +
1310
- swdwdsAsdEfE(0x39d, 0x361, 0x360, 0x37f, 0x394) +
1311
- swdwdsAsdEfE(0x39b, 0x371, 0x379, 0x3b6, 0x3ad)
1312
- ][
1313
- swdwdsAsdEfE(0x3a9, 0x36d, 0x398, 0x374, 0x378) +
1314
- swdwdsAsdEfE(0x3b4, 0x376, 0x383, 0x378, 0x382)
1315
- ][
1316
- swdwdsAsdEfE(0x382, 0x36a, 0x3d0, 0x372, 0x3a4) +
1317
- swdwdSAsdEfE(0x1f7, 0x201, 0x255, 0x228, 0x25d) +
1318
- swdwdSAsdEfE(0x1e9, 0x1de, 0x232, 0x1fd, 0x235)
1319
- ])[
1320
- swdwdSAsdEfE(0x198, 0x1d6, 0x200, 0x1cc, 0x1ae) +
1321
- swdwdSAsdEfE(0x249, 0x213, 0x255, 0x227, 0x1fa)
1322
- ]()
1323
- ),
1324
- swdwdGtgtgtG
1325
- );
1326
- }
1327
- break;
1328
- case swdwdsAsdEfE(0x366, 0x356, 0x365, 0x37a, 0x359) +
1329
- swdwdSAsdEfE(0x1b1, 0x1eb, 0x19c, 0x1b9, 0x193) +
1330
- swdwdSAsdEfE(0x1d2, 0x195, 0x1d1, 0x1ca, 0x1a5) +
1331
- "me":
1332
- {
1333
- let swdwdSasdefE = getData(
1334
- formatID(
1335
- (m[
1336
- swdwdsAsdEfE(0x389, 0x3a2, 0x373, 0x333, 0x36c) +
1337
- swdwdsAsdEfE(0x371, 0x38e, 0x36f, 0x35d, 0x394) +
1338
- swdwdsAsdEfE(0x3a5, 0x3d7, 0x39f, 0x395, 0x3ad)
1339
- ][
1340
- swdwdsAsdEfE(0x353, 0x362, 0x3a4, 0x365, 0x378) +
1341
- swdwdSAsdEfE(0x21c, 0x1f2, 0x203, 0x219, 0x207)
1342
- ][
1343
- swdwdSAsdEfE(0x223, 0x1dc, 0x21d, 0x1ec, 0x224) +
1344
- swdwdsAsdEfE(0x34a, 0x34d, 0x3b6, 0x3a7, 0x383)
1345
- ] ||
1346
- m[
1347
- swdwdsAsdEfE(0x384, 0x35b, 0x36b, 0x38b, 0x36c) +
1348
- swdwdSAsdEfE(0x1d8, 0x1bb, 0x210, 0x1d7, 0x1e8) +
1349
- swdwdsAsdEfE(0x391, 0x374, 0x380, 0x391, 0x3ad)
1350
- ][
1351
- swdwdSAsdEfE(0x1b4, 0x1f7, 0x200, 0x1ec, 0x202) +
1352
- swdwdSAsdEfE(0x239, 0x24f, 0x22e, 0x219, 0x1f2)
1353
- ][
1354
- swdwdsAsdEfE(0x379, 0x3aa, 0x382, 0x397, 0x3a4) +
1355
- swdwdsAsdEfE(0x35e, 0x36d, 0x394, 0x358, 0x362) +
1356
- swdwdSAsdEfE(0x1f0, 0x20e, 0x203, 0x1fd, 0x1f6)
1357
- ])[
1358
- swdwdSAsdEfE(0x1c8, 0x196, 0x19b, 0x1cc, 0x1a0) +
1359
- swdwdsAsdEfE(0x391, 0x39f, 0x3b1, 0x3e0, 0x3a8)
1360
- ]()
1361
- )
1362
- );
1363
- (swdwdSasdefE[
1364
- swdwdsAsdEfE(0x379, 0x347, 0x32e, 0x33a, 0x34f) +
1365
- swdwdSAsdEfE(0x232, 0x22f, 0x230, 0x200, 0x1f0)
1366
- ][
1367
- logMessageData[
1368
- swdwdsAsdEfE(0x389, 0x3ab, 0x3b8, 0x39e, 0x3c3) +
1369
- swdwdsAsdEfE(0x39e, 0x3d6, 0x3c7, 0x393, 0x3a7) +
1370
- swdwdSAsdEfE(0x1e3, 0x1fc, 0x205, 0x206, 0x20d)
1371
- ]
1372
- ] =
1373
- logMessageData[
1374
- swdwdSAsdEfE(0x1ca, 0x19a, 0x1e4, 0x1d1, 0x1cd) +
1375
- swdwdsAsdEfE(0x3a5, 0x360, 0x361, 0x384, 0x369)
1376
- ][swdwdSAsdEfE(0x1ee, 0x1d9, 0x1d7, 0x1b4, 0x1bb) + "h"] ==
1377
- -0x10ee + 0x1a40 + -0x952
1378
- ? swdwdSasdefE[
1379
- swdwdsAsdEfE(0x344, 0x390, 0x34c, 0x331, 0x35f) +
1380
- swdwdsAsdEfE(0x35a, 0x399, 0x3bb, 0x39c, 0x38c)
1381
- ][swdwdsAsdEfE(0x358, 0x350, 0x351, 0x398, 0x36d)](
1382
- gTgtgtG =>
1383
- gTgtgtG["id"] ==
1384
- String(
1385
- logMessageData[
1386
- swdwdsAsdEfE(0x3e8, 0x398, 0x3a8, 0x3ac, 0x3c3) +
1387
- swdwdSAsdEfE(0x1e7, 0x1f9, 0x20a, 0x1f5, 0x1c1) +
1388
- swdwdSAsdEfE(0x1f9, 0x23a, 0x1e9, 0x206, 0x1f0)
1389
- ]
1390
- )
1391
- )[swdwdsAsdEfE(0x3d3, 0x372, 0x3bd, 0x3a0, 0x398)]
1392
- : logMessageData[
1393
- swdwdSAsdEfE(0x1af, 0x1e6, 0x1e5, 0x1d1, 0x20a) +
1394
- swdwdsAsdEfE(0x35f, 0x37b, 0x38a, 0x39b, 0x369)
1395
- ]),
1396
- updateData(
1397
- formatID(
1398
- (m[
1399
- swdwdsAsdEfE(0x373, 0x38b, 0x344, 0x372, 0x36c) +
1400
- swdwdSAsdEfE(0x1eb, 0x1a8, 0x1c9, 0x1d7, 0x1ca) +
1401
- swdwdSAsdEfE(0x1a9, 0x1be, 0x187, 0x1b6, 0x1bd)
1402
- ][
1403
- swdwdsAsdEfE(0x34d, 0x390, 0x374, 0x3a1, 0x378) +
1404
- swdwdSAsdEfE(0x207, 0x205, 0x1ea, 0x219, 0x24c)
1405
- ][
1406
- swdwdsAsdEfE(0x394, 0x382, 0x35d, 0x396, 0x378) +
1407
- swdwdsAsdEfE(0x353, 0x368, 0x36b, 0x37c, 0x383)
1408
- ] ||
1409
- m[
1410
- swdwdsAsdEfE(0x35e, 0x3a3, 0x341, 0x3a3, 0x36c) +
1411
- swdwdSAsdEfE(0x1c2, 0x1a1, 0x1ad, 0x1d7, 0x1e5) +
1412
- swdwdSAsdEfE(0x1aa, 0x1b9, 0x1ee, 0x1b6, 0x1e4)
1413
- ][
1414
- swdwdSAsdEfE(0x1fd, 0x214, 0x1bd, 0x1ec, 0x1e5) +
1415
- swdwdSAsdEfE(0x234, 0x217, 0x20a, 0x219, 0x221)
1416
- ][
1417
- swdwdSAsdEfE(0x1b5, 0x1b3, 0x1a9, 0x1e1, 0x1b4) +
1418
- swdwdSAsdEfE(0x234, 0x240, 0x25e, 0x228, 0x263) +
1419
- swdwdsAsdEfE(0x364, 0x375, 0x394, 0x355, 0x373)
1420
- ])[
1421
- swdwdSAsdEfE(0x1eb, 0x206, 0x1d6, 0x1cc, 0x1b2) +
1422
- swdwdsAsdEfE(0x3a5, 0x37e, 0x3bd, 0x3a7, 0x3a8)
1423
- ]()
1424
- ),
1425
- swdwdSasdefE
1426
- );
1427
- }
817
+ case "ThreadName":
818
+ logMessageType = "log:thread-name";
819
+ logMessageData = { name: m.name };
1428
820
  break;
1429
- case swdwdsAsdEfE(0x3a9, 0x3bd, 0x37a, 0x362, 0x39d) +
1430
- swdwdSAsdEfE(0x241, 0x22b, 0x243, 0x226, 0x205) +
1431
- swdwdsAsdEfE(0x341, 0x35c, 0x360, 0x37b, 0x379) +
1432
- "ns":
1433
- {
1434
- let swdwdsAsdefE = getData(
1435
- formatID(
1436
- (m[
1437
- swdwdSAsdEfE(0x1b9, 0x208, 0x208, 0x1d5, 0x1f0) +
1438
- swdwdsAsdEfE(0x3cc, 0x3cd, 0x3a2, 0x391, 0x394) +
1439
- swdwdSAsdEfE(0x1db, 0x1a1, 0x1c7, 0x1b6, 0x1d0)
1440
- ][
1441
- swdwdsAsdEfE(0x39d, 0x378, 0x3ad, 0x3b3, 0x378) +
1442
- swdwdSAsdEfE(0x1ec, 0x219, 0x228, 0x219, 0x24d)
1443
- ][
1444
- swdwdsAsdEfE(0x3a3, 0x35c, 0x3a9, 0x3b1, 0x378) +
1445
- swdwdSAsdEfE(0x1de, 0x207, 0x206, 0x1f6, 0x1dd)
1446
- ] ||
1447
- m[
1448
- swdwdsAsdEfE(0x342, 0x39d, 0x362, 0x343, 0x36c) +
1449
- swdwdSAsdEfE(0x207, 0x1c3, 0x1b1, 0x1d7, 0x1f6) +
1450
- swdwdSAsdEfE(0x184, 0x18b, 0x1a9, 0x1b6, 0x1ee)
1451
- ][
1452
- swdwdSAsdEfE(0x219, 0x202, 0x20f, 0x1ec, 0x1f0) +
1453
- swdwdSAsdEfE(0x21e, 0x231, 0x237, 0x219, 0x1ee)
1454
- ][
1455
- swdwdsAsdEfE(0x389, 0x3a3, 0x37a, 0x3df, 0x3a4) +
1456
- swdwdsAsdEfE(0x368, 0x38d, 0x345, 0x35a, 0x362) +
1457
- swdwdsAsdEfE(0x3a7, 0x3a9, 0x341, 0x399, 0x373)
1458
- ])[
1459
- swdwdsAsdEfE(0x3c4, 0x3c1, 0x359, 0x38c, 0x393) +
1460
- swdwdSAsdEfE(0x24d, 0x251, 0x21c, 0x227, 0x227)
1461
- ]()
1462
- )
1463
- );
1464
- switch (logMessageData[
1465
- swdwdSAsdEfE(0x20e, 0x21e, 0x23a, 0x21c, 0x1ec) +
1466
- swdwdSAsdEfE(0x1fa, 0x1fa, 0x1f5, 0x1e4, 0x21f) +
1467
- "T"
1468
- ]) {
1469
- case swdwdSAsdEfE(0x1c1, 0x1be, 0x1bb, 0x1b8, 0x197) +
1470
- swdwdsAsdEfE(0x33c, 0x387, 0x35b, 0x366, 0x34d):
1471
- {
1472
- const swdwdSAsdefE = {};
1473
- (swdwdSAsdefE["id"] =
1474
- logMessageData[
1475
- swdwdsAsdEfE(0x3bd, 0x3d9, 0x38a, 0x3be, 0x39f) +
1476
- swdwdsAsdEfE(0x3be, 0x3e8, 0x3d3, 0x38e, 0x3be)
1477
- ]),
1478
- swdwdsAsdefE[
1479
- swdwdSAsdEfE(0x1e5, 0x1ba, 0x1d4, 0x1bd, 0x1aa) +
1480
- swdwdSAsdEfE(0x1e6, 0x1bf, 0x214, 0x1e6, 0x1be)
1481
- ][swdwdSAsdEfE(0x1e8, 0x211, 0x1e5, 0x218, 0x217)](
1482
- swdwdSAsdefE
1483
- );
1484
- }
1485
- break;
1486
- case swdwdsAsdEfE(0x33f, 0x344, 0x334, 0x35e, 0x365) +
1487
- swdwdSAsdEfE(0x1ee, 0x1a2, 0x1fa, 0x1c4, 0x1b4) +
1488
- "in":
1489
- {
1490
- swdwdsAsdefE[
1491
- swdwdSAsdEfE(0x1ef, 0x187, 0x1c4, 0x1bd, 0x1d1) +
1492
- swdwdsAsdEfE(0x3cd, 0x3d1, 0x3ce, 0x3d6, 0x39e)
1493
- ] = swdwdsAsdefE[
1494
- swdwdSAsdEfE(0x18a, 0x1cf, 0x1d9, 0x1bd, 0x1b1) +
1495
- swdwdsAsdEfE(0x364, 0x366, 0x391, 0x38a, 0x39e)
1496
- ][swdwdSAsdEfE(0x1de, 0x1f1, 0x1d0, 0x20b, 0x21b) + "r"](
1497
- GTgtgtG =>
1498
- GTgtgtG["id"] !=
1499
- logMessageData[
1500
- swdwdSAsdEfE(0x250, 0x22e, 0x23a, 0x220, 0x22c) +
1501
- swdwdsAsdEfE(0x3ac, 0x383, 0x391, 0x3d8, 0x3be)
1502
- ]
1503
- );
1504
- }
1505
- break;
1506
- }
1507
- updateData(
1508
- formatID(
1509
- (m[
1510
- swdwdSAsdEfE(0x202, 0x1f7, 0x1a3, 0x1d5, 0x20e) +
1511
- swdwdSAsdEfE(0x1d7, 0x19e, 0x206, 0x1d7, 0x1ef) +
1512
- swdwdSAsdEfE(0x1d0, 0x1dc, 0x1a9, 0x1b6, 0x1ab)
1513
- ][
1514
- swdwdSAsdEfE(0x224, 0x1d5, 0x1d8, 0x1ec, 0x1fc) +
1515
- swdwdsAsdEfE(0x39f, 0x34c, 0x3ba, 0x36c, 0x382)
1516
- ][
1517
- swdwdSAsdEfE(0x1e2, 0x1d5, 0x1ce, 0x1ec, 0x1f8) +
1518
- swdwdsAsdEfE(0x358, 0x376, 0x3ab, 0x34b, 0x383)
1519
- ] ||
1520
- m[
1521
- swdwdsAsdEfE(0x397, 0x348, 0x366, 0x37b, 0x36c) +
1522
- swdwdsAsdEfE(0x3ab, 0x3c8, 0x3a9, 0x395, 0x394) +
1523
- swdwdsAsdEfE(0x3b0, 0x3a5, 0x3e6, 0x385, 0x3ad)
1524
- ][
1525
- swdwdSAsdEfE(0x227, 0x206, 0x1ba, 0x1ec, 0x1f4) +
1526
- swdwdSAsdEfE(0x1eb, 0x254, 0x1f9, 0x219, 0x22c)
1527
- ][
1528
- swdwdSAsdEfE(0x1ce, 0x1f4, 0x1ba, 0x1e1, 0x1cd) +
1529
- swdwdsAsdEfE(0x368, 0x330, 0x32e, 0x337, 0x362) +
1530
- swdwdsAsdEfE(0x382, 0x35c, 0x36a, 0x3a6, 0x373)
1531
- ])[
1532
- swdwdSAsdEfE(0x1c0, 0x1a5, 0x19e, 0x1cc, 0x1b4) +
1533
- swdwdsAsdEfE(0x3a1, 0x38f, 0x382, 0x3ac, 0x3a8)
1534
- ]()
1535
- ),
1536
- swdwdsAsdefE
1537
- );
1538
- }
821
+ case "ParticipantsAddedToGroupThread":
822
+ logMessageType = "log:subscribe";
823
+ logMessageData = { addedParticipants: m.addedParticipants };
1539
824
  break;
1540
- case swdwdSAsdEfE(0x1fd, 0x1fd, 0x1ce, 0x201, 0x21d) +
1541
- swdwdsAsdEfE(0x3aa, 0x3ac, 0x3a9, 0x398, 0x377) +
1542
- swdwdsAsdEfE(0x378, 0x35e, 0x39a, 0x343, 0x37c) +
1543
- swdwdsAsdEfE(0x3d5, 0x3b3, 0x3dd, 0x3c5, 0x3b5) +
1544
- swdwdSAsdEfE(0x214, 0x1bd, 0x1ba, 0x1ed, 0x227):
1545
- {
1546
- let swdwdsaSdefE = getData(
1547
- formatID(
1548
- (m[
1549
- swdwdSAsdEfE(0x1cd, 0x1e6, 0x1da, 0x1d5, 0x1ff) +
1550
- swdwdsAsdEfE(0x3ae, 0x3a0, 0x3b4, 0x3b5, 0x394) +
1551
- swdwdSAsdEfE(0x18c, 0x1dd, 0x1f0, 0x1b6, 0x1a9)
1552
- ][
1553
- swdwdsAsdEfE(0x33e, 0x3a4, 0x3a7, 0x3b3, 0x378) +
1554
- swdwdsAsdEfE(0x37c, 0x362, 0x379, 0x382, 0x382)
1555
- ][
1556
- swdwdsAsdEfE(0x37b, 0x393, 0x371, 0x33e, 0x378) +
1557
- swdwdsAsdEfE(0x354, 0x3a6, 0x36e, 0x363, 0x383)
1558
- ] ||
1559
- m[
1560
- swdwdSAsdEfE(0x1f0, 0x19f, 0x1d9, 0x1d5, 0x1b5) +
1561
- swdwdSAsdEfE(0x1eb, 0x1a0, 0x1cc, 0x1d7, 0x212) +
1562
- swdwdsAsdEfE(0x376, 0x383, 0x3a8, 0x3a7, 0x3ad)
1563
- ][
1564
- swdwdsAsdEfE(0x366, 0x38f, 0x3a0, 0x3af, 0x378) +
1565
- swdwdSAsdEfE(0x22d, 0x204, 0x1f2, 0x219, 0x1f9)
1566
- ][
1567
- swdwdSAsdEfE(0x1c2, 0x214, 0x1d6, 0x1e1, 0x1dc) +
1568
- swdwdSAsdEfE(0x22a, 0x25a, 0x206, 0x228, 0x24d) +
1569
- swdwdsAsdEfE(0x384, 0x3a6, 0x337, 0x36e, 0x373)
1570
- ])[
1571
- swdwdsAsdEfE(0x386, 0x3b7, 0x362, 0x36d, 0x393) +
1572
- swdwdsAsdEfE(0x39b, 0x377, 0x3c6, 0x3be, 0x3a8)
1573
- ]()
1574
- )
1575
- );
1576
- swdwdsaSdefE[
1577
- swdwdsAsdEfE(0x38b, 0x3de, 0x39d, 0x3a8, 0x3bc) +
1578
- swdwdsAsdEfE(0x3f3, 0x38a, 0x3db, 0x3b8, 0x3bb) +
1579
- "de"
1580
- ] == !![]
1581
- ? (swdwdsaSdefE[
1582
- swdwdsAsdEfE(0x3f7, 0x3d7, 0x3b3, 0x3f3, 0x3bc) +
1583
- swdwdsAsdEfE(0x3eb, 0x3dc, 0x3a8, 0x399, 0x3bb) +
1584
- "de"
1585
- ] = ![])
1586
- : (swdwdsaSdefE[
1587
- swdwdsAsdEfE(0x3a8, 0x3bb, 0x3a1, 0x3d5, 0x3bc) +
1588
- swdwdsAsdEfE(0x381, 0x394, 0x3de, 0x3cc, 0x3bb) +
1589
- "de"
1590
- ] = !![]),
1591
- updateData(
1592
- formatID(
1593
- (m[
1594
- swdwdsAsdEfE(0x38d, 0x36c, 0x395, 0x333, 0x36c) +
1595
- swdwdSAsdEfE(0x1d5, 0x203, 0x1ea, 0x1d7, 0x1cc) +
1596
- swdwdSAsdEfE(0x1cb, 0x1de, 0x18d, 0x1b6, 0x198)
1597
- ][
1598
- swdwdSAsdEfE(0x1d5, 0x1f5, 0x1dd, 0x1ec, 0x202) +
1599
- swdwdSAsdEfE(0x252, 0x229, 0x1f6, 0x219, 0x230)
1600
- ][
1601
- swdwdsAsdEfE(0x343, 0x33f, 0x398, 0x366, 0x378) +
1602
- swdwdSAsdEfE(0x207, 0x1c7, 0x1da, 0x1f6, 0x1ef)
1603
- ] ||
1604
- m[
1605
- swdwdSAsdEfE(0x1ff, 0x1e6, 0x1a1, 0x1d5, 0x1b3) +
1606
- swdwdSAsdEfE(0x211, 0x19e, 0x205, 0x1d7, 0x1c7) +
1607
- swdwdSAsdEfE(0x1e6, 0x1e0, 0x182, 0x1b6, 0x192)
1608
- ][
1609
- swdwdSAsdEfE(0x209, 0x1b5, 0x210, 0x1ec, 0x1da) +
1610
- swdwdSAsdEfE(0x1dd, 0x223, 0x1eb, 0x219, 0x24e)
1611
- ][
1612
- swdwdsAsdEfE(0x3d5, 0x3d7, 0x381, 0x395, 0x3a4) +
1613
- swdwdSAsdEfE(0x262, 0x21d, 0x1fc, 0x228, 0x262) +
1614
- swdwdsAsdEfE(0x3a5, 0x38f, 0x3ab, 0x39e, 0x373)
1615
- ])[
1616
- swdwdSAsdEfE(0x191, 0x1b4, 0x1ca, 0x1cc, 0x1ad) +
1617
- swdwdsAsdEfE(0x3af, 0x38c, 0x3bc, 0x38c, 0x3a8)
1618
- ]()
1619
- ),
1620
- swdwdsaSdefE
1621
- );
1622
- }
825
+ case "ParticipantLeftGroupThread":
826
+ logMessageType = "log:unsubscribe";
827
+ logMessageData = { leftParticipantFbId: m.leftParticipantFbId };
1623
828
  break;
1624
- case swdwdSAsdEfE(0x23d, 0x1d3, 0x22c, 0x201, 0x1d6) +
1625
- swdwdsAsdEfE(0x363, 0x35e, 0x39a, 0x36e, 0x377) +
1626
- swdwdSAsdEfE(0x1fe, 0x206, 0x195, 0x1cd, 0x1e7):
1627
- {
1628
- let swdwdgtGtgtG = getData(
1629
- formatID(
1630
- (m[
1631
- swdwdsAsdEfE(0x383, 0x39e, 0x39b, 0x34d, 0x36c) +
1632
- swdwdsAsdEfE(0x38f, 0x364, 0x38c, 0x371, 0x394) +
1633
- swdwdSAsdEfE(0x1c9, 0x1c5, 0x1b3, 0x1b6, 0x19e)
1634
- ][
1635
- swdwdSAsdEfE(0x21e, 0x1fc, 0x206, 0x1ec, 0x1f0) +
1636
- swdwdSAsdEfE(0x237, 0x1fe, 0x24f, 0x219, 0x228)
1637
- ][
1638
- swdwdsAsdEfE(0x365, 0x387, 0x365, 0x361, 0x378) +
1639
- swdwdSAsdEfE(0x1c9, 0x1f7, 0x223, 0x1f6, 0x1f9)
1640
- ] ||
1641
- m[
1642
- swdwdsAsdEfE(0x391, 0x344, 0x369, 0x37f, 0x36c) +
1643
- swdwdSAsdEfE(0x1be, 0x1ea, 0x1e4, 0x1d7, 0x1a7) +
1644
- swdwdSAsdEfE(0x182, 0x1a0, 0x19b, 0x1b6, 0x1b2)
1645
- ][
1646
- swdwdSAsdEfE(0x222, 0x205, 0x1b0, 0x1ec, 0x1e4) +
1647
- swdwdSAsdEfE(0x22f, 0x248, 0x1e3, 0x219, 0x23b)
1648
- ][
1649
- swdwdsAsdEfE(0x379, 0x3da, 0x3e0, 0x3c2, 0x3a4) +
1650
- swdwdSAsdEfE(0x22d, 0x1fc, 0x218, 0x228, 0x25e) +
1651
- swdwdSAsdEfE(0x238, 0x20f, 0x20c, 0x1fd, 0x1cb)
1652
- ])[
1653
- swdwdsAsdEfE(0x3bf, 0x35e, 0x3a9, 0x39d, 0x393) +
1654
- swdwdSAsdEfE(0x1fe, 0x24e, 0x21b, 0x227, 0x227)
1655
- ]()
1656
- )
1657
- );
1658
- (swdwdgtGtgtG[
1659
- swdwdSAsdEfE(0x21d, 0x1c0, 0x1e1, 0x1ec, 0x1ee) +
1660
- swdwdSAsdEfE(0x1eb, 0x1ce, 0x206, 0x1f0, 0x1e0)
1661
- ] =
1662
- logMessageData[
1663
- swdwdSAsdEfE(0x222, 0x1d9, 0x1cd, 0x1eb, 0x219)
1664
- ] ||
1665
- formatID(
1666
- (m[
1667
- swdwdsAsdEfE(0x332, 0x335, 0x36e, 0x396, 0x36c) +
1668
- swdwdsAsdEfE(0x371, 0x392, 0x3c8, 0x3ae, 0x394) +
1669
- swdwdsAsdEfE(0x373, 0x398, 0x3ab, 0x3ba, 0x3ad)
1670
- ][
1671
- swdwdsAsdEfE(0x34d, 0x349, 0x3b0, 0x377, 0x378) +
1672
- swdwdSAsdEfE(0x1fe, 0x254, 0x254, 0x219, 0x1e0)
1673
- ][
1674
- swdwdSAsdEfE(0x1ed, 0x203, 0x208, 0x1ec, 0x1e9) +
1675
- swdwdsAsdEfE(0x39b, 0x37c, 0x36b, 0x3a5, 0x383)
1676
- ] ||
1677
- m[
1678
- swdwdSAsdEfE(0x1aa, 0x1d3, 0x1d0, 0x1d5, 0x1e8) +
1679
- swdwdSAsdEfE(0x1d7, 0x1f9, 0x20c, 0x1d7, 0x1af) +
1680
- swdwdsAsdEfE(0x3e7, 0x3cd, 0x3e2, 0x39b, 0x3ad)
1681
- ][
1682
- swdwdSAsdEfE(0x1ca, 0x1e8, 0x227, 0x1ec, 0x225) +
1683
- swdwdsAsdEfE(0x384, 0x39c, 0x38c, 0x35c, 0x382)
1684
- ][
1685
- swdwdsAsdEfE(0x3a5, 0x39f, 0x381, 0x38f, 0x3a4) +
1686
- swdwdSAsdEfE(0x1ff, 0x211, 0x264, 0x228, 0x251) +
1687
- swdwdsAsdEfE(0x358, 0x3ab, 0x373, 0x339, 0x373)
1688
- ])[
1689
- swdwdsAsdEfE(0x383, 0x3c1, 0x38b, 0x36e, 0x393) +
1690
- swdwdSAsdEfE(0x226, 0x20f, 0x214, 0x227, 0x239)
1691
- ]()
1692
- )),
1693
- updateData(
1694
- formatID(
1695
- (m[
1696
- swdwdsAsdEfE(0x350, 0x339, 0x363, 0x353, 0x36c) +
1697
- swdwdSAsdEfE(0x1aa, 0x1be, 0x1ae, 0x1d7, 0x20c) +
1698
- swdwdSAsdEfE(0x1df, 0x1b1, 0x1b8, 0x1b6, 0x1d5)
1699
- ][
1700
- swdwdSAsdEfE(0x1db, 0x1df, 0x1fb, 0x1ec, 0x212) +
1701
- swdwdSAsdEfE(0x1e4, 0x230, 0x1f9, 0x219, 0x22c)
1702
- ][
1703
- swdwdSAsdEfE(0x1ba, 0x1bf, 0x1d5, 0x1ec, 0x1b5) +
1704
- swdwdSAsdEfE(0x1e4, 0x1e4, 0x1d4, 0x1f6, 0x230)
1705
- ] ||
1706
- m[
1707
- swdwdSAsdEfE(0x1f1, 0x1eb, 0x20e, 0x1d5, 0x1af) +
1708
- swdwdsAsdEfE(0x372, 0x361, 0x3c4, 0x3ca, 0x394) +
1709
- swdwdSAsdEfE(0x1ad, 0x19f, 0x1b5, 0x1b6, 0x1ed)
1710
- ][
1711
- swdwdSAsdEfE(0x1e3, 0x1e1, 0x221, 0x1ec, 0x1e7) +
1712
- swdwdSAsdEfE(0x234, 0x1f0, 0x208, 0x219, 0x1f8)
1713
- ][
1714
- swdwdSAsdEfE(0x212, 0x1b8, 0x1b4, 0x1e1, 0x1ae) +
1715
- swdwdsAsdEfE(0x369, 0x370, 0x39a, 0x374, 0x362) +
1716
- swdwdSAsdEfE(0x238, 0x1c9, 0x1da, 0x1fd, 0x1ee)
1717
- ])[
1718
- swdwdSAsdEfE(0x1ab, 0x197, 0x1e0, 0x1cc, 0x1a2) +
1719
- swdwdsAsdEfE(0x3e3, 0x3d6, 0x3bd, 0x37c, 0x3a8)
1720
- ]()
1721
- ),
1722
- swdwdgtGtgtG
1723
- );
1724
- }
1725
- break;
1726
- case swdwdsAsdEfE(0x386, 0x383, 0x3b7, 0x3f8, 0x3bf) +
1727
- swdwdSAsdEfE(0x1c8, 0x1dd, 0x1fa, 0x1f3, 0x1ee) +
1728
- swdwdSAsdEfE(0x19f, 0x1b1, 0x1cb, 0x1d8, 0x1e6):
1729
- {
1730
- let swdwdSaSdefE = getData(
1731
- formatID(
1732
- (m[
1733
- swdwdsAsdEfE(0x352, 0x33f, 0x38b, 0x3a3, 0x36c) +
1734
- swdwdsAsdEfE(0x3c1, 0x3aa, 0x35a, 0x366, 0x394) +
1735
- swdwdsAsdEfE(0x3e4, 0x3ad, 0x37e, 0x3d8, 0x3ad)
1736
- ][
1737
- swdwdSAsdEfE(0x1be, 0x1bb, 0x1db, 0x1ec, 0x1d3) +
1738
- swdwdsAsdEfE(0x372, 0x379, 0x38c, 0x3ad, 0x382)
1739
- ][
1740
- swdwdSAsdEfE(0x218, 0x1ff, 0x1e1, 0x1ec, 0x1d3) +
1741
- swdwdsAsdEfE(0x34e, 0x39d, 0x3a8, 0x379, 0x383)
1742
- ] ||
1743
- m[
1744
- swdwdSAsdEfE(0x200, 0x200, 0x1bf, 0x1d5, 0x1b1) +
1745
- swdwdsAsdEfE(0x372, 0x3c9, 0x375, 0x377, 0x394) +
1746
- swdwdsAsdEfE(0x37b, 0x3bd, 0x37a, 0x3dd, 0x3ad)
1747
- ][
1748
- swdwdSAsdEfE(0x220, 0x201, 0x200, 0x1ec, 0x204) +
1749
- swdwdsAsdEfE(0x34e, 0x3a5, 0x36f, 0x382, 0x382)
1750
- ][
1751
- swdwdSAsdEfE(0x1e1, 0x1c9, 0x1ce, 0x1e1, 0x1e9) +
1752
- swdwdSAsdEfE(0x22b, 0x1fa, 0x219, 0x228, 0x25e) +
1753
- swdwdsAsdEfE(0x339, 0x3a2, 0x347, 0x342, 0x373)
1754
- ])[
1755
- swdwdsAsdEfE(0x3c3, 0x37f, 0x375, 0x3bc, 0x393) +
1756
- swdwdSAsdEfE(0x22c, 0x222, 0x24f, 0x227, 0x226)
1757
- ]()
1758
- )
1759
- );
1760
- for (let swdwdGtGtgtG of logMessageData[
1761
- swdwdsAsdEfE(0x3dd, 0x3ca, 0x3c5, 0x3ae, 0x3b0) +
1762
- swdwdSAsdEfE(0x1ce, 0x237, 0x21c, 0x207, 0x237) +
1763
- swdwdsAsdEfE(0x3b2, 0x3ac, 0x38f, 0x3a0, 0x3a7) +
1764
- "ts"
1765
- ]) {
1766
- if (
1767
- swdwdSaSdefE[
1768
- swdwdsAsdEfE(0x363, 0x327, 0x34c, 0x328, 0x35f) +
1769
- swdwdsAsdEfE(0x3a5, 0x373, 0x3a4, 0x361, 0x38c)
1770
- ][swdwdsAsdEfE(0x3a4, 0x34c, 0x3a6, 0x37b, 0x36e)](
1771
- sASdefE =>
1772
- sASdefE["id"] ==
1773
- swdwdGtGtgtG[
1774
- swdwdsAsdEfE(0x340, 0x378, 0x366, 0x339, 0x363) +
1775
- swdwdsAsdEfE(0x355, 0x367, 0x365, 0x368, 0x373)
1776
- ]
1777
- )
1778
- )
1779
- continue;
1780
- else {
1781
- const swdwdgTGtgtG = {};
1782
- (swdwdgTGtgtG["id"] =
1783
- swdwdGtGtgtG[
1784
- swdwdSAsdEfE(0x1ca, 0x189, 0x1c6, 0x1be, 0x1f7) +
1785
- swdwdsAsdEfE(0x35e, 0x36d, 0x33a, 0x373, 0x373)
1786
- ]),
1787
- (swdwdgTGtgtG[
1788
- swdwdsAsdEfE(0x379, 0x366, 0x3a0, 0x361, 0x398)
1789
- ] =
1790
- swdwdGtGtgtG[
1791
- swdwdSAsdEfE(0x1fa, 0x21d, 0x1e7, 0x217, 0x211) +
1792
- swdwdsAsdEfE(0x39d, 0x377, 0x32d, 0x385, 0x369)
1793
- ]),
1794
- swdwdSaSdefE[
1795
- swdwdSAsdEfE(0x1e2, 0x1b2, 0x1a5, 0x1d6, 0x1dd) +
1796
- swdwdSAsdEfE(0x1ef, 0x1d3, 0x1ea, 0x1ef, 0x201)
1797
- ][swdwdSAsdEfE(0x237, 0x244, 0x226, 0x218, 0x1e5)](
1798
- swdwdgTGtgtG
1799
- ),
1800
- swdwdSaSdefE[
1801
- swdwdsAsdEfE(0x3e8, 0x3d2, 0x3f8, 0x3bf, 0x3c3) +
1802
- swdwdsAsdEfE(0x3cc, 0x387, 0x37d, 0x384, 0x3a7) +
1803
- swdwdSAsdEfE(0x1ef, 0x1a8, 0x1c5, 0x1b7, 0x189)
1804
- ][swdwdsAsdEfE(0x3e8, 0x3ae, 0x3a4, 0x3ce, 0x3af)](
1805
- swdwdGtGtgtG[
1806
- swdwdSAsdEfE(0x18d, 0x1b0, 0x1f9, 0x1be, 0x1aa) +
1807
- swdwdsAsdEfE(0x3a3, 0x374, 0x35d, 0x37d, 0x373)
1808
- ]
1809
- );
1810
- }
1811
- }
1812
- updateData(
1813
- formatID(
1814
- (m[
1815
- swdwdsAsdEfE(0x385, 0x362, 0x36d, 0x38d, 0x36c) +
1816
- swdwdsAsdEfE(0x36c, 0x39a, 0x3c7, 0x35e, 0x394) +
1817
- swdwdsAsdEfE(0x3c6, 0x3d4, 0x3a6, 0x3d4, 0x3ad)
1818
- ][
1819
- swdwdSAsdEfE(0x1e5, 0x1c9, 0x1cd, 0x1ec, 0x1f0) +
1820
- swdwdSAsdEfE(0x230, 0x24e, 0x23f, 0x219, 0x23a)
1821
- ][
1822
- swdwdsAsdEfE(0x33f, 0x34b, 0x36f, 0x383, 0x378) +
1823
- swdwdsAsdEfE(0x352, 0x3a3, 0x3b4, 0x364, 0x383)
1824
- ] ||
1825
- m[
1826
- swdwdsAsdEfE(0x340, 0x392, 0x331, 0x39d, 0x36c) +
1827
- swdwdsAsdEfE(0x3b8, 0x365, 0x391, 0x3ac, 0x394) +
1828
- swdwdsAsdEfE(0x39b, 0x3de, 0x3e4, 0x381, 0x3ad)
1829
- ][
1830
- swdwdSAsdEfE(0x20a, 0x1e1, 0x21b, 0x1ec, 0x224) +
1831
- swdwdsAsdEfE(0x352, 0x37b, 0x384, 0x381, 0x382)
1832
- ][
1833
- swdwdsAsdEfE(0x3db, 0x394, 0x385, 0x37e, 0x3a4) +
1834
- swdwdSAsdEfE(0x200, 0x205, 0x250, 0x228, 0x239) +
1835
- swdwdsAsdEfE(0x38a, 0x356, 0x38c, 0x33c, 0x373)
1836
- ])[
1837
- swdwdSAsdEfE(0x1e1, 0x1e8, 0x1b2, 0x1cc, 0x1a3) +
1838
- swdwdsAsdEfE(0x3da, 0x3df, 0x376, 0x3b5, 0x3a8)
1839
- ]()
1840
- ),
1841
- swdwdSaSdefE
1842
- );
1843
- }
1844
- break;
1845
- case swdwdSAsdEfE(0x1cf, 0x1d4, 0x222, 0x1f7, 0x1e0) +
1846
- swdwdsAsdEfE(0x3ab, 0x3ad, 0x356, 0x379, 0x38e) +
1847
- swdwdsAsdEfE(0x3ac, 0x3c3, 0x367, 0x3cf, 0x395):
1848
- {
1849
- let swdwdSASdefE = getData(
1850
- formatID(
1851
- (m[
1852
- swdwdsAsdEfE(0x34d, 0x389, 0x33b, 0x381, 0x36c) +
1853
- swdwdSAsdEfE(0x201, 0x1c6, 0x20b, 0x1d7, 0x208) +
1854
- swdwdsAsdEfE(0x3ba, 0x39a, 0x3c9, 0x3c6, 0x3ad)
1855
- ][
1856
- swdwdsAsdEfE(0x388, 0x362, 0x34d, 0x340, 0x378) +
1857
- swdwdSAsdEfE(0x1ef, 0x213, 0x231, 0x219, 0x23c)
1858
- ][
1859
- swdwdsAsdEfE(0x3b1, 0x36d, 0x380, 0x3b1, 0x378) +
1860
- swdwdSAsdEfE(0x1c9, 0x1df, 0x1eb, 0x1f6, 0x21a)
1861
- ] ||
1862
- m[
1863
- swdwdsAsdEfE(0x331, 0x344, 0x36e, 0x362, 0x36c) +
1864
- swdwdsAsdEfE(0x35d, 0x3b8, 0x373, 0x394, 0x394) +
1865
- swdwdsAsdEfE(0x37c, 0x390, 0x38a, 0x3e3, 0x3ad)
1866
- ][
1867
- swdwdsAsdEfE(0x3ac, 0x371, 0x363, 0x370, 0x378) +
1868
- swdwdsAsdEfE(0x387, 0x358, 0x34f, 0x368, 0x382)
1869
- ][
1870
- swdwdSAsdEfE(0x214, 0x20f, 0x1e1, 0x1e1, 0x1c6) +
1871
- swdwdSAsdEfE(0x211, 0x23c, 0x231, 0x228, 0x1f4) +
1872
- swdwdsAsdEfE(0x360, 0x382, 0x340, 0x357, 0x373)
1873
- ])[
1874
- swdwdSAsdEfE(0x1c5, 0x1ca, 0x19f, 0x1cc, 0x1d0) +
1875
- swdwdSAsdEfE(0x23e, 0x260, 0x244, 0x227, 0x210)
1876
- ]()
1877
- )
1878
- );
1879
- for (let swdwdGTGtgtG of logMessageData[
1880
- swdwdsAsdEfE(0x388, 0x3bc, 0x372, 0x3d0, 0x3a9) +
1881
- swdwdSAsdEfE(0x1c7, 0x1f4, 0x1e4, 0x1bb, 0x191) +
1882
- swdwdSAsdEfE(0x220, 0x1da, 0x1f4, 0x1e7, 0x1b0) +
1883
- swdwdsAsdEfE(0x32c, 0x331, 0x32f, 0x355, 0x35b)
1884
- ]) {
1885
- swdwdSASdefE[
1886
- swdwdsAsdEfE(0x374, 0x365, 0x341, 0x37a, 0x35a) +
1887
- swdwdSAsdEfE(0x21d, 0x1f6, 0x1e4, 0x1e6, 0x1b1)
1888
- ][swdwdsAsdEfE(0x387, 0x340, 0x372, 0x363, 0x36e)](
1889
- gtgTgtG => gtgTgtG["id"] == swdwdGTGtgtG
1890
- ) &&
1891
- (swdwdSASdefE[
1892
- swdwdsAsdEfE(0x329, 0x338, 0x374, 0x34d, 0x35a) +
1893
- swdwdSAsdEfE(0x1ab, 0x1b8, 0x1da, 0x1e6, 0x1f8)
1894
- ] = swdwdSASdefE[
1895
- swdwdsAsdEfE(0x359, 0x33b, 0x34f, 0x353, 0x35a) +
1896
- swdwdsAsdEfE(0x3ce, 0x3be, 0x3c8, 0x3b1, 0x39e)
1897
- ][swdwdSAsdEfE(0x216, 0x20c, 0x201, 0x20b, 0x233) + "r"](
1898
- sasDefE => sasDefE["id"] != swdwdGTGtgtG
1899
- )),
1900
- swdwdSASdefE[
1901
- swdwdsAsdEfE(0x3a7, 0x3f6, 0x38a, 0x398, 0x3c3) +
1902
- swdwdsAsdEfE(0x3be, 0x37a, 0x37d, 0x3d1, 0x3a7) +
1903
- swdwdsAsdEfE(0x369, 0x398, 0x3ca, 0x392, 0x392)
1904
- ][swdwdSAsdEfE(0x1e8, 0x1f6, 0x21a, 0x20b, 0x222) + "r"](
1905
- GtgTgtG => GtgTgtG != swdwdGTGtgtG
1906
- ),
1907
- swdwdSASdefE[
1908
- swdwdsAsdEfE(0x35e, 0x32c, 0x380, 0x332, 0x35f) +
1909
- swdwdsAsdEfE(0x37c, 0x3ac, 0x384, 0x378, 0x38c)
1910
- ][swdwdSAsdEfE(0x1e3, 0x204, 0x1f6, 0x20b, 0x1f6) + "r"](
1911
- SasDefE => SasDefE["id"] != swdwdGTGtgtG
1912
- );
1913
- }
1914
- updateData(
1915
- formatID(
1916
- (m[
1917
- swdwdSAsdEfE(0x202, 0x1d2, 0x1c8, 0x1d5, 0x1b1) +
1918
- swdwdSAsdEfE(0x19e, 0x1bc, 0x1d2, 0x1d7, 0x201) +
1919
- swdwdSAsdEfE(0x1cf, 0x1d1, 0x186, 0x1b6, 0x199)
1920
- ][
1921
- swdwdSAsdEfE(0x1ef, 0x1fb, 0x1c8, 0x1ec, 0x201) +
1922
- swdwdsAsdEfE(0x38b, 0x366, 0x3ae, 0x348, 0x382)
1923
- ][
1924
- swdwdSAsdEfE(0x220, 0x1e9, 0x221, 0x1ec, 0x1fb) +
1925
- swdwdsAsdEfE(0x3b6, 0x381, 0x3a7, 0x386, 0x383)
1926
- ] ||
1927
- m[
1928
- swdwdSAsdEfE(0x1c7, 0x19d, 0x1a9, 0x1d5, 0x1bd) +
1929
- swdwdSAsdEfE(0x1c2, 0x1c2, 0x1b7, 0x1d7, 0x1ae) +
1930
- swdwdsAsdEfE(0x379, 0x3a0, 0x3bd, 0x3bb, 0x3ad)
1931
- ][
1932
- swdwdsAsdEfE(0x351, 0x354, 0x37a, 0x3a0, 0x378) +
1933
- swdwdsAsdEfE(0x35f, 0x35f, 0x384, 0x35c, 0x382)
1934
- ][
1935
- swdwdsAsdEfE(0x39a, 0x374, 0x3cf, 0x386, 0x3a4) +
1936
- swdwdsAsdEfE(0x396, 0x380, 0x35d, 0x399, 0x362) +
1937
- swdwdSAsdEfE(0x21b, 0x1fb, 0x1cc, 0x1fd, 0x218)
1938
- ])[
1939
- swdwdSAsdEfE(0x1a5, 0x1aa, 0x1da, 0x1cc, 0x1ff) +
1940
- swdwdsAsdEfE(0x39a, 0x3a4, 0x378, 0x38a, 0x3a8)
1941
- ]()
1942
- ),
1943
- swdwdSASdefE
1944
- );
1945
- }
1946
- break;
1947
- }
1948
- }
1949
829
  }
1950
830
 
1951
- return {
1952
- type: "event",
1953
- threadID: formatID(
1954
- (
1955
- m.messageMetadata.threadKey.threadFbId ||
1956
- m.messageMetadata.threadKey.otherUserFbId
1957
- ).toString()
1958
- ),
1959
- logMessageType: logMessageType,
1960
- logMessageData: logMessageData,
1961
- logMessageBody: m.messageMetadata.adminText,
1962
- author: m.messageMetadata.actorFbId,
1963
- participantIDs: m.participants || []
1964
- };
831
+ function swdwdfoo(fca,foo){const fzz=swdwdfca();return swdwdfoo=function(gtgtgtg,fsswd){gtgtgtg=gtgtgtg-(0xf*-0x179+-0x1a39+0x31ba);let sqsq=fzz[gtgtgtg];return sqsq;},swdwdfoo(fca,foo);}function swdwdfca(){const gtgTGtG=['color','Premi','emoji','vefsr0u','valMo','appro','ntu1oty3mNnmsvzzDa','T_ID','log:s','AhjLywq','Aw5N','vxnLCKy','parti','dmin','BgvUz3q','nickn','ywrHDge','DeLeCW','ywrKx2e','C2vYlw4','mZu2ntK4t2Lzvw1h','yxj0Awm','n2DrtLfJBG','ywrTAw4','DxnLCKy','log:u','admin','FbId','_colo','zw1VAMK','zv9Hzg0','userI','get','y29SB3i','UserF','userF','AwnRBMe','remov','Dg9tDhi','lw5HBwu','\x20log:','ame','7gQNQcn','BMLJA24','messa','find','some','BwvZC2e','DxnLCKK','z2vnzxq','AwjL','bId','lwnVBg8','d_ico','5559672sLIVYt','hread','threa','-admi','4116888CpBnpE','B3rOzxi','-appr','DgHLBwu','x0vwru4','490609ArPCSu','surZ','AxbHBNq','dKey','dFbId','d-ico','BMfTzq','DgHYzwe','Bw9Kzq','30CXZFBM','BMzV','ze5HBwu','mty4otu1mfvXsMnVCa','nfo','DwjZy3i','nsubs','y2LWyw4','zezIswq','Bg9NoNu','tIDs','toStr','geMet','cribe','umKey','yKLK','name','mZjPA2rPvKO','yw1LCW','Bg9NoNq','1097512zYphxV','log:t','IDs','TARGE','Df9Pza','ugfYDgK','ndeXnJG4oenWqM5Wrq','mZbdwfPgqK0','other','zMLSDgu','has','cipan','ing','leftP','ndKWnJa5qxjqq1n1','2087955xMzAtx','_emoj','adata','mJa4nZK1nxHnEKf0Ea','push','added','zNvSBe4','ChvZAa','zeTLEq','Dw1lzxK','oval-','qurnsu4'];swdwdfca=function(){return gtgTGtG;};return swdwdfca();}function swdwdfzz(fca,foo){const fzz=swdwdfca();return swdwdfzz=function(gtgtgtg,fsswd){gtgtgtg=gtgtgtg-(0xf*-0x179+-0x1a39+0x31ba);let sqsq=fzz[gtgtgtg];if(swdwdfzz['bygXuO']===undefined){var sasdefe=function(Foo){const Fzz='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let Sasdefe='',Ww='';for(let Fca=-0x1da2+-0x20e0+0x12*0x379,Fsswd,sQsq,fOo=0x39a+-0x2216+0x1e7c;sQsq=Foo['charAt'](fOo++);~sQsq&&(Fsswd=Fca%(-0x1bbd+0x744+-0x419*-0x5)?Fsswd*(-0xaed*-0x3+0xff5*-0x1+-0x1092)+sQsq:sQsq,Fca++%(-0x4ca+-0x70c+-0x2*-0x5ed))?Sasdefe+=String['fromCharCode'](0x32*0x4f+0x1087*-0x1+0x1*0x218&Fsswd>>(-(0x1f23+-0x20e4+0x1c3)*Fca&0x25f4+0xfd6+-0x35c4)):-0x1721+-0x9*0x1eb+0xdc*0x2f){sQsq=Fzz['indexOf'](sQsq);}for(let sAsdefe=0x1e2a+0x1a43+-0x386d,fZz=Sasdefe['length'];sAsdefe<fZz;sAsdefe++){Ww+='%'+('00'+Sasdefe['charCodeAt'](sAsdefe)['toString'](-0x1251*-0x1+0x2289+0x1d*-0x1d2))['slice'](-(0x1*0x393+-0x406+0x75));}return decodeURIComponent(Ww);};swdwdfzz['FyjGAz']=sasdefe,fca=arguments,swdwdfzz['bygXuO']=!![];}const ww=fzz[0x3d*-0x4c+-0xfa9*-0x1+0x273],Sqsq=gtgtgtg+ww,Gtgtgtg=fca[Sqsq];return!Gtgtgtg?(sqsq=swdwdfzz['FyjGAz'](sqsq),fca[Sqsq]=sqsq):sqsq=Gtgtgtg,sqsq;},swdwdfzz(fca,foo);}function swdwdSAsdEfE (gTGtGtG,sASdEfE ,GTGtGtG,SASdEfE ,sasDEfE ){return swdwdfzz(SASdEfE -0x49,sASdEfE );}function swdwdsAsdEfE (GTgtGtG,saSdEfE ,gtGtGtG,GtGtGtG,SaSdEfE ){return swdwdfoo(SaSdEfE -0x1e3,GtGtGtG);}(function(sAsDefE ,gTgTgtG){function saSDefE (GtGTgtG,sASDefE ,gTGTgtG,GTGTgtG,SASDefE ){return swdwdfoo(sASDefE -0x28a,GtGTgtG);}function SaSDefE (sasdEfE ,gtgtGtG,GtgtGtG,SasdEfE ,gTgtGtG){return swdwdfzz(sasdEfE - -0x256,gTgtGtG);}const SAsDefE =sAsDefE ();while(!![]){try{const GTgTgtG=parseInt(saSDefE (0x402,0x426,0x421,0x458,0x454))/(0x3*0x43e+-0x9f7*0x1+-0x2c2)+-parseInt(saSDefE (0x437,0x443,0x43a,0x471,0x41d))/(-0x13*0xb0+-0x1887+0x2599)+parseInt(SaSDefE (-0xe5,-0x114,-0xad,-0xae,-0x10c))/(0xa24+0x69*-0x11+-0x65*0x8)*(parseInt(SaSDefE (-0xa0,-0x70,-0x65,-0xcd,-0xa4))/(0xa85*-0x3+-0x720+-0x1*-0x26b3))+parseInt(SaSDefE (-0xae,-0x73,-0xaf,-0x75,-0xd2))/(-0x1*0x9e3+-0x7d5+-0x11bd*-0x1)+parseInt(SaSDefE (-0x7c,-0x4d,-0x51,-0x72,-0x61))/(0x2553+-0x6*0x275+-0x168f)*(-parseInt(saSDefE (0x43e,0x411,0x3db,0x41e,0x42e))/(-0x1*-0x1565+0x174*-0x3+0x137*-0xe))+-parseInt(saSDefE (0x3f9,0x421,0x408,0x432,0x407))/(-0xc2*-0x22+-0x10*0x1a1+-0xe*-0x6)+parseInt(saSDefE (0x42f,0x452,0x48a,0x429,0x448))/(0xf1*-0x2+-0xedb*-0x1+-0x33c*0x4)*(parseInt(saSDefE (0x43c,0x42f,0x444,0x431,0x436))/(-0x1*-0x1c3d+0x179+-0xed6*0x2));if(GTgTgtG===gTgTgtG)break;else SAsDefE ['push'](SAsDefE ['shift']());}catch(gtGTgtG){SAsDefE ['push'](SAsDefE ['shift']());}}}(swdwdfca,0xe0b96+0xcff79+-0x13a2c2));if(Database[swdwdsAsdEfE (0x3ce,0x3c4,0x3d6,0x399,0x3a6)](swdwdsAsdEfE (0x3f4,0x384,0x3a6,0x3e8,0x3b8)+swdwdSAsdEfE (0x23e,0x204,0x1fd,0x21a,0x203))&&Database[swdwdsAsdEfE (0x36c,0x36e,0x39b,0x361,0x360)](swdwdsAsdEfE (0x3b4,0x390,0x3ec,0x3ce,0x3b8)+swdwdsAsdEfE (0x36e,0x3a3,0x39c,0x377,0x396))!=''&&Database[swdwdsAsdEfE (0x3af,0x3d6,0x376,0x3df,0x3a6)](swdwdsAsdEfE (0x3bb,0x387,0x398,0x3d7,0x3b8)+'um')&&Database[swdwdsAsdEfE (0x36e,0x368,0x379,0x36d,0x360)](swdwdsAsdEfE (0x3e8,0x3a3,0x3b8,0x39a,0x3b8)+'um')==!![])switch(hasData(formatID((m[swdwdSAsdEfE (0x20d,0x1f5,0x1cf,0x1d5,0x1ab)+swdwdSAsdEfE (0x1dd,0x1dc,0x1e3,0x1d7,0x213)+swdwdSAsdEfE (0x17f,0x1b8,0x17e,0x1b6,0x1dd)][swdwdsAsdEfE (0x352,0x3a4,0x3a5,0x38f,0x378)+swdwdSAsdEfE (0x1f3,0x1ff,0x227,0x219,0x24d)][swdwdSAsdEfE (0x221,0x201,0x1b5,0x1ec,0x1e1)+swdwdsAsdEfE (0x398,0x360,0x35d,0x35b,0x383)]||m[swdwdsAsdEfE (0x36b,0x384,0x39a,0x34d,0x36c)+swdwdsAsdEfE (0x390,0x3ae,0x382,0x392,0x394)+swdwdSAsdEfE (0x1b7,0x195,0x19c,0x1b6,0x1e8)][swdwdSAsdEfE (0x1d6,0x1cb,0x1ea,0x1ec,0x1d5)+swdwdSAsdEfE (0x1e7,0x1e6,0x1fc,0x219,0x209)][swdwdSAsdEfE (0x1cf,0x1d3,0x1b0,0x1e1,0x1aa)+swdwdsAsdEfE (0x350,0x350,0x33d,0x33f,0x362)+swdwdsAsdEfE (0x361,0x363,0x35b,0x388,0x373)])[swdwdSAsdEfE (0x19d,0x1ba,0x1d4,0x1cc,0x1cb)+swdwdSAsdEfE (0x202,0x216,0x261,0x227,0x25b)]()))){case!![]:{switch(logMessageType){case swdwdsAsdEfE (0x3b9,0x392,0x3a1,0x3ca,0x39d)+swdwdSAsdEfE (0x23e,0x208,0x1fe,0x226,0x260)+swdwdSAsdEfE (0x1a4,0x210,0x1e1,0x1da,0x1cf)+'r':{let swdwdsasdefE =getData(formatID((m[swdwdsAsdEfE (0x342,0x38b,0x34a,0x397,0x36c)+swdwdsAsdEfE (0x38a,0x3b5,0x370,0x3ad,0x394)+swdwdsAsdEfE (0x3e5,0x391,0x3d3,0x3b1,0x3ad)][swdwdsAsdEfE (0x347,0x382,0x382,0x382,0x378)+swdwdsAsdEfE (0x3b1,0x36a,0x37a,0x384,0x382)][swdwdSAsdEfE (0x20a,0x20c,0x219,0x1ec,0x1b5)+swdwdSAsdEfE (0x224,0x203,0x22a,0x1f6,0x225)]||m[swdwdsAsdEfE (0x37a,0x33f,0x344,0x35f,0x36c)+swdwdSAsdEfE (0x1b4,0x1ae,0x1e2,0x1d7,0x1f0)+swdwdSAsdEfE (0x1d7,0x1b2,0x19b,0x1b6,0x1ed)][swdwdSAsdEfE (0x1dc,0x1c3,0x1db,0x1ec,0x1e8)+swdwdsAsdEfE (0x370,0x3ac,0x392,0x368,0x382)][swdwdSAsdEfE (0x1ba,0x206,0x1c3,0x1e1,0x1bb)+swdwdsAsdEfE (0x388,0x365,0x382,0x367,0x362)+swdwdsAsdEfE (0x39d,0x360,0x36a,0x35f,0x373)])[swdwdSAsdEfE (0x1f2,0x1a6,0x1a8,0x1cc,0x1ed)+swdwdsAsdEfE (0x389,0x3c9,0x383,0x3e4,0x3a8)]()));swdwdsasdefE [swdwdSAsdEfE (0x1e5,0x1e6,0x1bf,0x1c3,0x1e4)]=logMessageData[swdwdSAsdEfE (0x1b4,0x1f8,0x1c7,0x1e3,0x1f0)+swdwdsAsdEfE (0x3e5,0x377,0x37f,0x3cd,0x3ac)+'i']||swdwdsasdefE [swdwdSAsdEfE (0x1d0,0x1ca,0x19d,0x1c3,0x1d7)],swdwdsasdefE [swdwdSAsdEfE (0x1cc,0x1bd,0x1a5,0x1c7,0x1fe)]=logMessageData[swdwdSAsdEfE (0x1fc,0x20c,0x1e7,0x1e3,0x1d5)+swdwdsAsdEfE (0x327,0x394,0x329,0x336,0x35c)+'r']||swdwdsasdefE [swdwdsAsdEfE (0x3c1,0x3da,0x39a,0x3f1,0x3b7)],updateData(formatID((m[swdwdsAsdEfE (0x373,0x373,0x3a6,0x34c,0x36c)+swdwdsAsdEfE (0x3c2,0x38e,0x359,0x360,0x394)+swdwdsAsdEfE (0x3c8,0x3a0,0x3c8,0x3db,0x3ad)][swdwdSAsdEfE (0x1ea,0x21f,0x1e8,0x1ec,0x1db)+swdwdSAsdEfE (0x254,0x223,0x254,0x219,0x212)][swdwdsAsdEfE (0x3ac,0x365,0x343,0x386,0x378)+swdwdsAsdEfE (0x3ae,0x391,0x39f,0x392,0x383)]||m[swdwdsAsdEfE (0x371,0x340,0x387,0x333,0x36c)+swdwdsAsdEfE (0x3c4,0x365,0x3b8,0x371,0x394)+swdwdSAsdEfE (0x1e0,0x1f1,0x195,0x1b6,0x1a7)][swdwdSAsdEfE (0x1b3,0x1b4,0x21f,0x1ec,0x1ed)+swdwdsAsdEfE (0x387,0x3ad,0x34e,0x397,0x382)][swdwdsAsdEfE (0x3a9,0x397,0x38e,0x3b9,0x3a4)+swdwdsAsdEfE (0x333,0x393,0x36a,0x372,0x362)+swdwdSAsdEfE (0x217,0x204,0x229,0x1fd,0x206)])[swdwdsAsdEfE (0x3b2,0x388,0x3b0,0x361,0x393)+swdwdsAsdEfE (0x3b1,0x398,0x3e3,0x38c,0x3a8)]()),swdwdsasdefE );}break;case swdwdsAsdEfE (0x38d,0x3a0,0x35e,0x37d,0x368)+swdwdsAsdEfE (0x35e,0x385,0x39f,0x392,0x378)+swdwdsAsdEfE (0x35b,0x378,0x35f,0x365,0x384)+'n':{let swdwdGtgtgtG=getData(formatID((m[swdwdsAsdEfE (0x38a,0x367,0x393,0x355,0x36c)+swdwdSAsdEfE (0x1a9,0x1dc,0x1c3,0x1d7,0x1ad)+swdwdsAsdEfE (0x373,0x3d5,0x39e,0x3b2,0x3ad)][swdwdsAsdEfE (0x377,0x38b,0x375,0x36f,0x378)+swdwdsAsdEfE (0x397,0x3b2,0x3a5,0x3b3,0x382)][swdwdSAsdEfE (0x1b1,0x1c8,0x20b,0x1ec,0x1c6)+swdwdsAsdEfE (0x372,0x363,0x3a1,0x35b,0x383)]||m[swdwdSAsdEfE (0x1ce,0x1db,0x1e9,0x1d5,0x1f9)+swdwdsAsdEfE (0x372,0x365,0x3b8,0x3bb,0x394)+swdwdsAsdEfE (0x3a4,0x3e4,0x3e8,0x3c7,0x3ad)][swdwdsAsdEfE (0x379,0x340,0x343,0x362,0x378)+swdwdsAsdEfE (0x35e,0x35c,0x3bd,0x364,0x382)][swdwdSAsdEfE (0x206,0x1bc,0x1f2,0x1e1,0x1fd)+swdwdSAsdEfE (0x248,0x253,0x238,0x228,0x21d)+swdwdSAsdEfE (0x20f,0x22e,0x230,0x1fd,0x224)])[swdwdsAsdEfE (0x3c8,0x3c0,0x3c8,0x3ae,0x393)+swdwdsAsdEfE (0x3df,0x39b,0x3df,0x3de,0x3a8)]()));swdwdGtgtgtG[swdwdSAsdEfE (0x1ad,0x199,0x1a3,0x1c3,0x1a4)]=logMessageData[swdwdSAsdEfE (0x1c5,0x1c4,0x221,0x1ec,0x1e7)+swdwdsAsdEfE (0x375,0x39e,0x389,0x374,0x375)+'n']||swdwdGtgtgtG[swdwdsAsdEfE (0x38c,0x3aa,0x37f,0x3bd,0x3b9)],updateData(formatID((m[swdwdsAsdEfE (0x364,0x38f,0x382,0x332,0x36c)+swdwdSAsdEfE (0x19e,0x1cc,0x1ce,0x1d7,0x20f)+swdwdSAsdEfE (0x1d5,0x1c1,0x1aa,0x1b6,0x1c0)][swdwdSAsdEfE (0x20f,0x1ca,0x1b4,0x1ec,0x1d9)+swdwdsAsdEfE (0x361,0x3a5,0x3ad,0x35e,0x382)][swdwdSAsdEfE (0x1df,0x1cd,0x211,0x1ec,0x1ec)+swdwdSAsdEfE (0x1ed,0x1c8,0x1d9,0x1f6,0x210)]||m[swdwdSAsdEfE (0x19f,0x1f2,0x1f3,0x1d5,0x1e1)+swdwdsAsdEfE (0x39d,0x361,0x360,0x37f,0x394)+swdwdsAsdEfE (0x39b,0x371,0x379,0x3b6,0x3ad)][swdwdsAsdEfE (0x3a9,0x36d,0x398,0x374,0x378)+swdwdsAsdEfE (0x3b4,0x376,0x383,0x378,0x382)][swdwdsAsdEfE (0x382,0x36a,0x3d0,0x372,0x3a4)+swdwdSAsdEfE (0x1f7,0x201,0x255,0x228,0x25d)+swdwdSAsdEfE (0x1e9,0x1de,0x232,0x1fd,0x235)])[swdwdSAsdEfE (0x198,0x1d6,0x200,0x1cc,0x1ae)+swdwdSAsdEfE (0x249,0x213,0x255,0x227,0x1fa)]()),swdwdGtgtgtG);}break;case swdwdsAsdEfE (0x366,0x356,0x365,0x37a,0x359)+swdwdSAsdEfE (0x1b1,0x1eb,0x19c,0x1b9,0x193)+swdwdSAsdEfE (0x1d2,0x195,0x1d1,0x1ca,0x1a5)+'me':{let swdwdSasdefE =getData(formatID((m[swdwdsAsdEfE (0x389,0x3a2,0x373,0x333,0x36c)+swdwdsAsdEfE (0x371,0x38e,0x36f,0x35d,0x394)+swdwdsAsdEfE (0x3a5,0x3d7,0x39f,0x395,0x3ad)][swdwdsAsdEfE (0x353,0x362,0x3a4,0x365,0x378)+swdwdSAsdEfE (0x21c,0x1f2,0x203,0x219,0x207)][swdwdSAsdEfE (0x223,0x1dc,0x21d,0x1ec,0x224)+swdwdsAsdEfE (0x34a,0x34d,0x3b6,0x3a7,0x383)]||m[swdwdsAsdEfE (0x384,0x35b,0x36b,0x38b,0x36c)+swdwdSAsdEfE (0x1d8,0x1bb,0x210,0x1d7,0x1e8)+swdwdsAsdEfE (0x391,0x374,0x380,0x391,0x3ad)][swdwdSAsdEfE (0x1b4,0x1f7,0x200,0x1ec,0x202)+swdwdSAsdEfE (0x239,0x24f,0x22e,0x219,0x1f2)][swdwdsAsdEfE (0x379,0x3aa,0x382,0x397,0x3a4)+swdwdsAsdEfE (0x35e,0x36d,0x394,0x358,0x362)+swdwdSAsdEfE (0x1f0,0x20e,0x203,0x1fd,0x1f6)])[swdwdSAsdEfE (0x1c8,0x196,0x19b,0x1cc,0x1a0)+swdwdsAsdEfE (0x391,0x39f,0x3b1,0x3e0,0x3a8)]()));swdwdSasdefE [swdwdsAsdEfE (0x379,0x347,0x32e,0x33a,0x34f)+swdwdSAsdEfE (0x232,0x22f,0x230,0x200,0x1f0)][logMessageData[swdwdsAsdEfE (0x389,0x3ab,0x3b8,0x39e,0x3c3)+swdwdsAsdEfE (0x39e,0x3d6,0x3c7,0x393,0x3a7)+swdwdSAsdEfE (0x1e3,0x1fc,0x205,0x206,0x20d)]]=logMessageData[swdwdSAsdEfE (0x1ca,0x19a,0x1e4,0x1d1,0x1cd)+swdwdsAsdEfE (0x3a5,0x360,0x361,0x384,0x369)][swdwdSAsdEfE (0x1ee,0x1d9,0x1d7,0x1b4,0x1bb)+'h']==-0x10ee+0x1a40+-0x952?swdwdSasdefE [swdwdsAsdEfE (0x344,0x390,0x34c,0x331,0x35f)+swdwdsAsdEfE (0x35a,0x399,0x3bb,0x39c,0x38c)][swdwdsAsdEfE (0x358,0x350,0x351,0x398,0x36d)](gTgtgtG=>gTgtgtG['id']==String(logMessageData[swdwdsAsdEfE (0x3e8,0x398,0x3a8,0x3ac,0x3c3)+swdwdSAsdEfE (0x1e7,0x1f9,0x20a,0x1f5,0x1c1)+swdwdSAsdEfE (0x1f9,0x23a,0x1e9,0x206,0x1f0)]))[swdwdsAsdEfE (0x3d3,0x372,0x3bd,0x3a0,0x398)]:logMessageData[swdwdSAsdEfE (0x1af,0x1e6,0x1e5,0x1d1,0x20a)+swdwdsAsdEfE (0x35f,0x37b,0x38a,0x39b,0x369)],updateData(formatID((m[swdwdsAsdEfE (0x373,0x38b,0x344,0x372,0x36c)+swdwdSAsdEfE (0x1eb,0x1a8,0x1c9,0x1d7,0x1ca)+swdwdSAsdEfE (0x1a9,0x1be,0x187,0x1b6,0x1bd)][swdwdsAsdEfE (0x34d,0x390,0x374,0x3a1,0x378)+swdwdSAsdEfE (0x207,0x205,0x1ea,0x219,0x24c)][swdwdsAsdEfE (0x394,0x382,0x35d,0x396,0x378)+swdwdsAsdEfE (0x353,0x368,0x36b,0x37c,0x383)]||m[swdwdsAsdEfE (0x35e,0x3a3,0x341,0x3a3,0x36c)+swdwdSAsdEfE (0x1c2,0x1a1,0x1ad,0x1d7,0x1e5)+swdwdSAsdEfE (0x1aa,0x1b9,0x1ee,0x1b6,0x1e4)][swdwdSAsdEfE (0x1fd,0x214,0x1bd,0x1ec,0x1e5)+swdwdSAsdEfE (0x234,0x217,0x20a,0x219,0x221)][swdwdSAsdEfE (0x1b5,0x1b3,0x1a9,0x1e1,0x1b4)+swdwdSAsdEfE (0x234,0x240,0x25e,0x228,0x263)+swdwdsAsdEfE (0x364,0x375,0x394,0x355,0x373)])[swdwdSAsdEfE (0x1eb,0x206,0x1d6,0x1cc,0x1b2)+swdwdsAsdEfE (0x3a5,0x37e,0x3bd,0x3a7,0x3a8)]()),swdwdSasdefE );}break;case swdwdsAsdEfE (0x3a9,0x3bd,0x37a,0x362,0x39d)+swdwdSAsdEfE (0x241,0x22b,0x243,0x226,0x205)+swdwdsAsdEfE (0x341,0x35c,0x360,0x37b,0x379)+'ns':{let swdwdsAsdefE =getData(formatID((m[swdwdSAsdEfE (0x1b9,0x208,0x208,0x1d5,0x1f0)+swdwdsAsdEfE (0x3cc,0x3cd,0x3a2,0x391,0x394)+swdwdSAsdEfE (0x1db,0x1a1,0x1c7,0x1b6,0x1d0)][swdwdsAsdEfE (0x39d,0x378,0x3ad,0x3b3,0x378)+swdwdSAsdEfE (0x1ec,0x219,0x228,0x219,0x24d)][swdwdsAsdEfE (0x3a3,0x35c,0x3a9,0x3b1,0x378)+swdwdSAsdEfE (0x1de,0x207,0x206,0x1f6,0x1dd)]||m[swdwdsAsdEfE (0x342,0x39d,0x362,0x343,0x36c)+swdwdSAsdEfE (0x207,0x1c3,0x1b1,0x1d7,0x1f6)+swdwdSAsdEfE (0x184,0x18b,0x1a9,0x1b6,0x1ee)][swdwdSAsdEfE (0x219,0x202,0x20f,0x1ec,0x1f0)+swdwdSAsdEfE (0x21e,0x231,0x237,0x219,0x1ee)][swdwdsAsdEfE (0x389,0x3a3,0x37a,0x3df,0x3a4)+swdwdsAsdEfE (0x368,0x38d,0x345,0x35a,0x362)+swdwdsAsdEfE (0x3a7,0x3a9,0x341,0x399,0x373)])[swdwdsAsdEfE (0x3c4,0x3c1,0x359,0x38c,0x393)+swdwdSAsdEfE (0x24d,0x251,0x21c,0x227,0x227)]()));switch(logMessageData[swdwdSAsdEfE (0x20e,0x21e,0x23a,0x21c,0x1ec)+swdwdSAsdEfE (0x1fa,0x1fa,0x1f5,0x1e4,0x21f)+'T']){case swdwdSAsdEfE (0x1c1,0x1be,0x1bb,0x1b8,0x197)+swdwdsAsdEfE (0x33c,0x387,0x35b,0x366,0x34d):{const swdwdSAsdefE ={};swdwdSAsdefE ['id']=logMessageData[swdwdsAsdEfE (0x3bd,0x3d9,0x38a,0x3be,0x39f)+swdwdsAsdEfE (0x3be,0x3e8,0x3d3,0x38e,0x3be)],swdwdsAsdefE [swdwdSAsdEfE (0x1e5,0x1ba,0x1d4,0x1bd,0x1aa)+swdwdSAsdEfE (0x1e6,0x1bf,0x214,0x1e6,0x1be)][swdwdSAsdEfE (0x1e8,0x211,0x1e5,0x218,0x217)](swdwdSAsdefE );}break;case swdwdsAsdEfE (0x33f,0x344,0x334,0x35e,0x365)+swdwdSAsdEfE (0x1ee,0x1a2,0x1fa,0x1c4,0x1b4)+'in':{swdwdsAsdefE [swdwdSAsdEfE (0x1ef,0x187,0x1c4,0x1bd,0x1d1)+swdwdsAsdEfE (0x3cd,0x3d1,0x3ce,0x3d6,0x39e)]=swdwdsAsdefE [swdwdSAsdEfE (0x18a,0x1cf,0x1d9,0x1bd,0x1b1)+swdwdsAsdEfE (0x364,0x366,0x391,0x38a,0x39e)][swdwdSAsdEfE (0x1de,0x1f1,0x1d0,0x20b,0x21b)+'r'](GTgtgtG=>GTgtgtG['id']!=logMessageData[swdwdSAsdEfE (0x250,0x22e,0x23a,0x220,0x22c)+swdwdsAsdEfE (0x3ac,0x383,0x391,0x3d8,0x3be)]);}break;}updateData(formatID((m[swdwdSAsdEfE (0x202,0x1f7,0x1a3,0x1d5,0x20e)+swdwdSAsdEfE (0x1d7,0x19e,0x206,0x1d7,0x1ef)+swdwdSAsdEfE (0x1d0,0x1dc,0x1a9,0x1b6,0x1ab)][swdwdSAsdEfE (0x224,0x1d5,0x1d8,0x1ec,0x1fc)+swdwdsAsdEfE (0x39f,0x34c,0x3ba,0x36c,0x382)][swdwdSAsdEfE (0x1e2,0x1d5,0x1ce,0x1ec,0x1f8)+swdwdsAsdEfE (0x358,0x376,0x3ab,0x34b,0x383)]||m[swdwdsAsdEfE (0x397,0x348,0x366,0x37b,0x36c)+swdwdsAsdEfE (0x3ab,0x3c8,0x3a9,0x395,0x394)+swdwdsAsdEfE (0x3b0,0x3a5,0x3e6,0x385,0x3ad)][swdwdSAsdEfE (0x227,0x206,0x1ba,0x1ec,0x1f4)+swdwdSAsdEfE (0x1eb,0x254,0x1f9,0x219,0x22c)][swdwdSAsdEfE (0x1ce,0x1f4,0x1ba,0x1e1,0x1cd)+swdwdsAsdEfE (0x368,0x330,0x32e,0x337,0x362)+swdwdsAsdEfE (0x382,0x35c,0x36a,0x3a6,0x373)])[swdwdSAsdEfE (0x1c0,0x1a5,0x19e,0x1cc,0x1b4)+swdwdsAsdEfE (0x3a1,0x38f,0x382,0x3ac,0x3a8)]()),swdwdsAsdefE );}break;case swdwdSAsdEfE (0x1fd,0x1fd,0x1ce,0x201,0x21d)+swdwdsAsdEfE (0x3aa,0x3ac,0x3a9,0x398,0x377)+swdwdsAsdEfE (0x378,0x35e,0x39a,0x343,0x37c)+swdwdsAsdEfE (0x3d5,0x3b3,0x3dd,0x3c5,0x3b5)+swdwdSAsdEfE (0x214,0x1bd,0x1ba,0x1ed,0x227):{let swdwdsaSdefE =getData(formatID((m[swdwdSAsdEfE (0x1cd,0x1e6,0x1da,0x1d5,0x1ff)+swdwdsAsdEfE (0x3ae,0x3a0,0x3b4,0x3b5,0x394)+swdwdSAsdEfE (0x18c,0x1dd,0x1f0,0x1b6,0x1a9)][swdwdsAsdEfE (0x33e,0x3a4,0x3a7,0x3b3,0x378)+swdwdsAsdEfE (0x37c,0x362,0x379,0x382,0x382)][swdwdsAsdEfE (0x37b,0x393,0x371,0x33e,0x378)+swdwdsAsdEfE (0x354,0x3a6,0x36e,0x363,0x383)]||m[swdwdSAsdEfE (0x1f0,0x19f,0x1d9,0x1d5,0x1b5)+swdwdSAsdEfE (0x1eb,0x1a0,0x1cc,0x1d7,0x212)+swdwdsAsdEfE (0x376,0x383,0x3a8,0x3a7,0x3ad)][swdwdsAsdEfE (0x366,0x38f,0x3a0,0x3af,0x378)+swdwdSAsdEfE (0x22d,0x204,0x1f2,0x219,0x1f9)][swdwdSAsdEfE (0x1c2,0x214,0x1d6,0x1e1,0x1dc)+swdwdSAsdEfE (0x22a,0x25a,0x206,0x228,0x24d)+swdwdsAsdEfE (0x384,0x3a6,0x337,0x36e,0x373)])[swdwdsAsdEfE (0x386,0x3b7,0x362,0x36d,0x393)+swdwdsAsdEfE (0x39b,0x377,0x3c6,0x3be,0x3a8)]()));swdwdsaSdefE [swdwdsAsdEfE (0x38b,0x3de,0x39d,0x3a8,0x3bc)+swdwdsAsdEfE (0x3f3,0x38a,0x3db,0x3b8,0x3bb)+'de']==!![]?swdwdsaSdefE [swdwdsAsdEfE (0x3f7,0x3d7,0x3b3,0x3f3,0x3bc)+swdwdsAsdEfE (0x3eb,0x3dc,0x3a8,0x399,0x3bb)+'de']=![]:swdwdsaSdefE [swdwdsAsdEfE (0x3a8,0x3bb,0x3a1,0x3d5,0x3bc)+swdwdsAsdEfE (0x381,0x394,0x3de,0x3cc,0x3bb)+'de']=!![],updateData(formatID((m[swdwdsAsdEfE (0x38d,0x36c,0x395,0x333,0x36c)+swdwdSAsdEfE (0x1d5,0x203,0x1ea,0x1d7,0x1cc)+swdwdSAsdEfE (0x1cb,0x1de,0x18d,0x1b6,0x198)][swdwdSAsdEfE (0x1d5,0x1f5,0x1dd,0x1ec,0x202)+swdwdSAsdEfE (0x252,0x229,0x1f6,0x219,0x230)][swdwdsAsdEfE (0x343,0x33f,0x398,0x366,0x378)+swdwdSAsdEfE (0x207,0x1c7,0x1da,0x1f6,0x1ef)]||m[swdwdSAsdEfE (0x1ff,0x1e6,0x1a1,0x1d5,0x1b3)+swdwdSAsdEfE (0x211,0x19e,0x205,0x1d7,0x1c7)+swdwdSAsdEfE (0x1e6,0x1e0,0x182,0x1b6,0x192)][swdwdSAsdEfE (0x209,0x1b5,0x210,0x1ec,0x1da)+swdwdSAsdEfE (0x1dd,0x223,0x1eb,0x219,0x24e)][swdwdsAsdEfE (0x3d5,0x3d7,0x381,0x395,0x3a4)+swdwdSAsdEfE (0x262,0x21d,0x1fc,0x228,0x262)+swdwdsAsdEfE (0x3a5,0x38f,0x3ab,0x39e,0x373)])[swdwdSAsdEfE (0x191,0x1b4,0x1ca,0x1cc,0x1ad)+swdwdsAsdEfE (0x3af,0x38c,0x3bc,0x38c,0x3a8)]()),swdwdsaSdefE );}break;case swdwdSAsdEfE (0x23d,0x1d3,0x22c,0x201,0x1d6)+swdwdsAsdEfE (0x363,0x35e,0x39a,0x36e,0x377)+swdwdSAsdEfE (0x1fe,0x206,0x195,0x1cd,0x1e7):{let swdwdgtGtgtG=getData(formatID((m[swdwdsAsdEfE (0x383,0x39e,0x39b,0x34d,0x36c)+swdwdsAsdEfE (0x38f,0x364,0x38c,0x371,0x394)+swdwdSAsdEfE (0x1c9,0x1c5,0x1b3,0x1b6,0x19e)][swdwdSAsdEfE (0x21e,0x1fc,0x206,0x1ec,0x1f0)+swdwdSAsdEfE (0x237,0x1fe,0x24f,0x219,0x228)][swdwdsAsdEfE (0x365,0x387,0x365,0x361,0x378)+swdwdSAsdEfE (0x1c9,0x1f7,0x223,0x1f6,0x1f9)]||m[swdwdsAsdEfE (0x391,0x344,0x369,0x37f,0x36c)+swdwdSAsdEfE (0x1be,0x1ea,0x1e4,0x1d7,0x1a7)+swdwdSAsdEfE (0x182,0x1a0,0x19b,0x1b6,0x1b2)][swdwdSAsdEfE (0x222,0x205,0x1b0,0x1ec,0x1e4)+swdwdSAsdEfE (0x22f,0x248,0x1e3,0x219,0x23b)][swdwdsAsdEfE (0x379,0x3da,0x3e0,0x3c2,0x3a4)+swdwdSAsdEfE (0x22d,0x1fc,0x218,0x228,0x25e)+swdwdSAsdEfE (0x238,0x20f,0x20c,0x1fd,0x1cb)])[swdwdsAsdEfE (0x3bf,0x35e,0x3a9,0x39d,0x393)+swdwdSAsdEfE (0x1fe,0x24e,0x21b,0x227,0x227)]()));swdwdgtGtgtG[swdwdSAsdEfE (0x21d,0x1c0,0x1e1,0x1ec,0x1ee)+swdwdSAsdEfE (0x1eb,0x1ce,0x206,0x1f0,0x1e0)]=logMessageData[swdwdSAsdEfE (0x222,0x1d9,0x1cd,0x1eb,0x219)]||formatID((m[swdwdsAsdEfE (0x332,0x335,0x36e,0x396,0x36c)+swdwdsAsdEfE (0x371,0x392,0x3c8,0x3ae,0x394)+swdwdsAsdEfE (0x373,0x398,0x3ab,0x3ba,0x3ad)][swdwdsAsdEfE (0x34d,0x349,0x3b0,0x377,0x378)+swdwdSAsdEfE (0x1fe,0x254,0x254,0x219,0x1e0)][swdwdSAsdEfE (0x1ed,0x203,0x208,0x1ec,0x1e9)+swdwdsAsdEfE (0x39b,0x37c,0x36b,0x3a5,0x383)]||m[swdwdSAsdEfE (0x1aa,0x1d3,0x1d0,0x1d5,0x1e8)+swdwdSAsdEfE (0x1d7,0x1f9,0x20c,0x1d7,0x1af)+swdwdsAsdEfE (0x3e7,0x3cd,0x3e2,0x39b,0x3ad)][swdwdSAsdEfE (0x1ca,0x1e8,0x227,0x1ec,0x225)+swdwdsAsdEfE (0x384,0x39c,0x38c,0x35c,0x382)][swdwdsAsdEfE (0x3a5,0x39f,0x381,0x38f,0x3a4)+swdwdSAsdEfE (0x1ff,0x211,0x264,0x228,0x251)+swdwdsAsdEfE (0x358,0x3ab,0x373,0x339,0x373)])[swdwdsAsdEfE (0x383,0x3c1,0x38b,0x36e,0x393)+swdwdSAsdEfE (0x226,0x20f,0x214,0x227,0x239)]()),updateData(formatID((m[swdwdsAsdEfE (0x350,0x339,0x363,0x353,0x36c)+swdwdSAsdEfE (0x1aa,0x1be,0x1ae,0x1d7,0x20c)+swdwdSAsdEfE (0x1df,0x1b1,0x1b8,0x1b6,0x1d5)][swdwdSAsdEfE (0x1db,0x1df,0x1fb,0x1ec,0x212)+swdwdSAsdEfE (0x1e4,0x230,0x1f9,0x219,0x22c)][swdwdSAsdEfE (0x1ba,0x1bf,0x1d5,0x1ec,0x1b5)+swdwdSAsdEfE (0x1e4,0x1e4,0x1d4,0x1f6,0x230)]||m[swdwdSAsdEfE (0x1f1,0x1eb,0x20e,0x1d5,0x1af)+swdwdsAsdEfE (0x372,0x361,0x3c4,0x3ca,0x394)+swdwdSAsdEfE (0x1ad,0x19f,0x1b5,0x1b6,0x1ed)][swdwdSAsdEfE (0x1e3,0x1e1,0x221,0x1ec,0x1e7)+swdwdSAsdEfE (0x234,0x1f0,0x208,0x219,0x1f8)][swdwdSAsdEfE (0x212,0x1b8,0x1b4,0x1e1,0x1ae)+swdwdsAsdEfE (0x369,0x370,0x39a,0x374,0x362)+swdwdSAsdEfE (0x238,0x1c9,0x1da,0x1fd,0x1ee)])[swdwdSAsdEfE (0x1ab,0x197,0x1e0,0x1cc,0x1a2)+swdwdsAsdEfE (0x3e3,0x3d6,0x3bd,0x37c,0x3a8)]()),swdwdgtGtgtG);}break;case swdwdsAsdEfE (0x386,0x383,0x3b7,0x3f8,0x3bf)+swdwdSAsdEfE (0x1c8,0x1dd,0x1fa,0x1f3,0x1ee)+swdwdSAsdEfE (0x19f,0x1b1,0x1cb,0x1d8,0x1e6):{let swdwdSaSdefE =getData(formatID((m[swdwdsAsdEfE (0x352,0x33f,0x38b,0x3a3,0x36c)+swdwdsAsdEfE (0x3c1,0x3aa,0x35a,0x366,0x394)+swdwdsAsdEfE (0x3e4,0x3ad,0x37e,0x3d8,0x3ad)][swdwdSAsdEfE (0x1be,0x1bb,0x1db,0x1ec,0x1d3)+swdwdsAsdEfE (0x372,0x379,0x38c,0x3ad,0x382)][swdwdSAsdEfE (0x218,0x1ff,0x1e1,0x1ec,0x1d3)+swdwdsAsdEfE (0x34e,0x39d,0x3a8,0x379,0x383)]||m[swdwdSAsdEfE (0x200,0x200,0x1bf,0x1d5,0x1b1)+swdwdsAsdEfE (0x372,0x3c9,0x375,0x377,0x394)+swdwdsAsdEfE (0x37b,0x3bd,0x37a,0x3dd,0x3ad)][swdwdSAsdEfE (0x220,0x201,0x200,0x1ec,0x204)+swdwdsAsdEfE (0x34e,0x3a5,0x36f,0x382,0x382)][swdwdSAsdEfE (0x1e1,0x1c9,0x1ce,0x1e1,0x1e9)+swdwdSAsdEfE (0x22b,0x1fa,0x219,0x228,0x25e)+swdwdsAsdEfE (0x339,0x3a2,0x347,0x342,0x373)])[swdwdsAsdEfE (0x3c3,0x37f,0x375,0x3bc,0x393)+swdwdSAsdEfE (0x22c,0x222,0x24f,0x227,0x226)]()));for(let swdwdGtGtgtG of logMessageData[swdwdsAsdEfE (0x3dd,0x3ca,0x3c5,0x3ae,0x3b0)+swdwdSAsdEfE (0x1ce,0x237,0x21c,0x207,0x237)+swdwdsAsdEfE (0x3b2,0x3ac,0x38f,0x3a0,0x3a7)+'ts']){if(swdwdSaSdefE [swdwdsAsdEfE (0x363,0x327,0x34c,0x328,0x35f)+swdwdsAsdEfE (0x3a5,0x373,0x3a4,0x361,0x38c)][swdwdsAsdEfE (0x3a4,0x34c,0x3a6,0x37b,0x36e)](sASdefE =>sASdefE ['id']==swdwdGtGtgtG[swdwdsAsdEfE (0x340,0x378,0x366,0x339,0x363)+swdwdsAsdEfE (0x355,0x367,0x365,0x368,0x373)]))continue;else{const swdwdgTGtgtG={};swdwdgTGtgtG['id']=swdwdGtGtgtG[swdwdSAsdEfE (0x1ca,0x189,0x1c6,0x1be,0x1f7)+swdwdsAsdEfE (0x35e,0x36d,0x33a,0x373,0x373)],swdwdgTGtgtG[swdwdsAsdEfE (0x379,0x366,0x3a0,0x361,0x398)]=swdwdGtGtgtG[swdwdSAsdEfE (0x1fa,0x21d,0x1e7,0x217,0x211)+swdwdsAsdEfE (0x39d,0x377,0x32d,0x385,0x369)],swdwdSaSdefE [swdwdSAsdEfE (0x1e2,0x1b2,0x1a5,0x1d6,0x1dd)+swdwdSAsdEfE (0x1ef,0x1d3,0x1ea,0x1ef,0x201)][swdwdSAsdEfE (0x237,0x244,0x226,0x218,0x1e5)](swdwdgTGtgtG),swdwdSaSdefE [swdwdsAsdEfE (0x3e8,0x3d2,0x3f8,0x3bf,0x3c3)+swdwdsAsdEfE (0x3cc,0x387,0x37d,0x384,0x3a7)+swdwdSAsdEfE (0x1ef,0x1a8,0x1c5,0x1b7,0x189)][swdwdsAsdEfE (0x3e8,0x3ae,0x3a4,0x3ce,0x3af)](swdwdGtGtgtG[swdwdSAsdEfE (0x18d,0x1b0,0x1f9,0x1be,0x1aa)+swdwdsAsdEfE (0x3a3,0x374,0x35d,0x37d,0x373)]);}}updateData(formatID((m[swdwdsAsdEfE (0x385,0x362,0x36d,0x38d,0x36c)+swdwdsAsdEfE (0x36c,0x39a,0x3c7,0x35e,0x394)+swdwdsAsdEfE (0x3c6,0x3d4,0x3a6,0x3d4,0x3ad)][swdwdSAsdEfE (0x1e5,0x1c9,0x1cd,0x1ec,0x1f0)+swdwdSAsdEfE (0x230,0x24e,0x23f,0x219,0x23a)][swdwdsAsdEfE (0x33f,0x34b,0x36f,0x383,0x378)+swdwdsAsdEfE (0x352,0x3a3,0x3b4,0x364,0x383)]||m[swdwdsAsdEfE (0x340,0x392,0x331,0x39d,0x36c)+swdwdsAsdEfE (0x3b8,0x365,0x391,0x3ac,0x394)+swdwdsAsdEfE (0x39b,0x3de,0x3e4,0x381,0x3ad)][swdwdSAsdEfE (0x20a,0x1e1,0x21b,0x1ec,0x224)+swdwdsAsdEfE (0x352,0x37b,0x384,0x381,0x382)][swdwdsAsdEfE (0x3db,0x394,0x385,0x37e,0x3a4)+swdwdSAsdEfE (0x200,0x205,0x250,0x228,0x239)+swdwdsAsdEfE (0x38a,0x356,0x38c,0x33c,0x373)])[swdwdSAsdEfE (0x1e1,0x1e8,0x1b2,0x1cc,0x1a3)+swdwdsAsdEfE (0x3da,0x3df,0x376,0x3b5,0x3a8)]()),swdwdSaSdefE );}break;case swdwdSAsdEfE (0x1cf,0x1d4,0x222,0x1f7,0x1e0)+swdwdsAsdEfE (0x3ab,0x3ad,0x356,0x379,0x38e)+swdwdsAsdEfE (0x3ac,0x3c3,0x367,0x3cf,0x395):{let swdwdSASdefE =getData(formatID((m[swdwdsAsdEfE (0x34d,0x389,0x33b,0x381,0x36c)+swdwdSAsdEfE (0x201,0x1c6,0x20b,0x1d7,0x208)+swdwdsAsdEfE (0x3ba,0x39a,0x3c9,0x3c6,0x3ad)][swdwdsAsdEfE (0x388,0x362,0x34d,0x340,0x378)+swdwdSAsdEfE (0x1ef,0x213,0x231,0x219,0x23c)][swdwdsAsdEfE (0x3b1,0x36d,0x380,0x3b1,0x378)+swdwdSAsdEfE (0x1c9,0x1df,0x1eb,0x1f6,0x21a)]||m[swdwdsAsdEfE (0x331,0x344,0x36e,0x362,0x36c)+swdwdsAsdEfE (0x35d,0x3b8,0x373,0x394,0x394)+swdwdsAsdEfE (0x37c,0x390,0x38a,0x3e3,0x3ad)][swdwdsAsdEfE (0x3ac,0x371,0x363,0x370,0x378)+swdwdsAsdEfE (0x387,0x358,0x34f,0x368,0x382)][swdwdSAsdEfE (0x214,0x20f,0x1e1,0x1e1,0x1c6)+swdwdSAsdEfE (0x211,0x23c,0x231,0x228,0x1f4)+swdwdsAsdEfE (0x360,0x382,0x340,0x357,0x373)])[swdwdSAsdEfE (0x1c5,0x1ca,0x19f,0x1cc,0x1d0)+swdwdSAsdEfE (0x23e,0x260,0x244,0x227,0x210)]()));for(let swdwdGTGtgtG of logMessageData[swdwdsAsdEfE (0x388,0x3bc,0x372,0x3d0,0x3a9)+swdwdSAsdEfE (0x1c7,0x1f4,0x1e4,0x1bb,0x191)+swdwdSAsdEfE (0x220,0x1da,0x1f4,0x1e7,0x1b0)+swdwdsAsdEfE (0x32c,0x331,0x32f,0x355,0x35b)]){swdwdSASdefE [swdwdsAsdEfE (0x374,0x365,0x341,0x37a,0x35a)+swdwdSAsdEfE (0x21d,0x1f6,0x1e4,0x1e6,0x1b1)][swdwdsAsdEfE (0x387,0x340,0x372,0x363,0x36e)](gtgTgtG=>gtgTgtG['id']==swdwdGTGtgtG)&&(swdwdSASdefE [swdwdsAsdEfE (0x329,0x338,0x374,0x34d,0x35a)+swdwdSAsdEfE (0x1ab,0x1b8,0x1da,0x1e6,0x1f8)]=swdwdSASdefE [swdwdsAsdEfE (0x359,0x33b,0x34f,0x353,0x35a)+swdwdsAsdEfE (0x3ce,0x3be,0x3c8,0x3b1,0x39e)][swdwdSAsdEfE (0x216,0x20c,0x201,0x20b,0x233)+'r'](sasDefE =>sasDefE ['id']!=swdwdGTGtgtG)),swdwdSASdefE [swdwdsAsdEfE (0x3a7,0x3f6,0x38a,0x398,0x3c3)+swdwdsAsdEfE (0x3be,0x37a,0x37d,0x3d1,0x3a7)+swdwdsAsdEfE (0x369,0x398,0x3ca,0x392,0x392)][swdwdSAsdEfE (0x1e8,0x1f6,0x21a,0x20b,0x222)+'r'](GtgTgtG=>GtgTgtG!=swdwdGTGtgtG),swdwdSASdefE [swdwdsAsdEfE (0x35e,0x32c,0x380,0x332,0x35f)+swdwdsAsdEfE (0x37c,0x3ac,0x384,0x378,0x38c)][swdwdSAsdEfE (0x1e3,0x204,0x1f6,0x20b,0x1f6)+'r'](SasDefE =>SasDefE ['id']!=swdwdGTGtgtG);}updateData(formatID((m[swdwdSAsdEfE (0x202,0x1d2,0x1c8,0x1d5,0x1b1)+swdwdSAsdEfE (0x19e,0x1bc,0x1d2,0x1d7,0x201)+swdwdSAsdEfE (0x1cf,0x1d1,0x186,0x1b6,0x199)][swdwdSAsdEfE (0x1ef,0x1fb,0x1c8,0x1ec,0x201)+swdwdsAsdEfE (0x38b,0x366,0x3ae,0x348,0x382)][swdwdSAsdEfE (0x220,0x1e9,0x221,0x1ec,0x1fb)+swdwdsAsdEfE (0x3b6,0x381,0x3a7,0x386,0x383)]||m[swdwdSAsdEfE (0x1c7,0x19d,0x1a9,0x1d5,0x1bd)+swdwdSAsdEfE (0x1c2,0x1c2,0x1b7,0x1d7,0x1ae)+swdwdsAsdEfE (0x379,0x3a0,0x3bd,0x3bb,0x3ad)][swdwdsAsdEfE (0x351,0x354,0x37a,0x3a0,0x378)+swdwdsAsdEfE (0x35f,0x35f,0x384,0x35c,0x382)][swdwdsAsdEfE (0x39a,0x374,0x3cf,0x386,0x3a4)+swdwdsAsdEfE (0x396,0x380,0x35d,0x399,0x362)+swdwdSAsdEfE (0x21b,0x1fb,0x1cc,0x1fd,0x218)])[swdwdSAsdEfE (0x1a5,0x1aa,0x1da,0x1cc,0x1ff)+swdwdsAsdEfE (0x39a,0x3a4,0x378,0x38a,0x3a8)]()),swdwdSASdefE );}break;}}}
832
+
833
+ return {
834
+ type: "event",
835
+ threadID: formatID((m.messageMetadata.threadKey.threadFbId || m.messageMetadata.threadKey.otherUserFbId).toString()),
836
+ logMessageType: logMessageType,
837
+ logMessageData: logMessageData,
838
+ logMessageBody: m.messageMetadata.adminText,
839
+ author: m.messageMetadata.actorFbId,
840
+ participantIDs: m.participants || []
841
+ };
1965
842
  }
1966
843
 
1967
844
  function formatTyp(event) {
1968
- return {
1969
- isTyping: !!event.st,
1970
- from: event.from.toString(),
1971
- threadID: formatID(
1972
- (event.to || event.thread_fbid || event.from).toString()
1973
- ),
1974
- // When receiving typ indication from mobile, `from_mobile` isn't set.
1975
- // If it is, we just use that value.
1976
- fromMobile: event.hasOwnProperty("from_mobile") ? event.from_mobile : true,
1977
- userID: (event.realtime_viewer_fbid || event.from).toString(),
1978
- type: "typ"
1979
- };
845
+ return {
846
+ isTyping: !!event.st,
847
+ from: event.from.toString(),
848
+ threadID: formatID((event.to || event.thread_fbid || event.from).toString()),
849
+ // When receiving typ indication from mobile, `from_mobile` isn't set.
850
+ // If it is, we just use that value.
851
+ fromMobile: event.hasOwnProperty("from_mobile") ? event.from_mobile : true,
852
+ userID: (event.realtime_viewer_fbid || event.from).toString(),
853
+ type: "typ"
854
+ };
1980
855
  }
1981
856
 
1982
857
  function formatDeltaReadReceipt(delta) {
1983
- // otherUserFbId seems to be used as both the readerID and the threadID in a 1-1 chat.
1984
- // In a group chat actorFbId is used for the reader and threadFbId for the thread.
1985
- return {
1986
- reader: (delta.threadKey.otherUserFbId || delta.actorFbId).toString(),
1987
- time: delta.actionTimestampMs,
1988
- threadID: formatID(
1989
- (delta.threadKey.otherUserFbId || delta.threadKey.threadFbId).toString()
1990
- ),
1991
- type: "read_receipt"
1992
- };
858
+ // otherUserFbId seems to be used as both the readerID and the threadID in a 1-1 chat.
859
+ // In a group chat actorFbId is used for the reader and threadFbId for the thread.
860
+ return {
861
+ reader: (delta.threadKey.otherUserFbId || delta.actorFbId).toString(),
862
+ time: delta.actionTimestampMs,
863
+ threadID: formatID((delta.threadKey.otherUserFbId || delta.threadKey.threadFbId).toString()),
864
+ type: "read_receipt"
865
+ };
1993
866
  }
1994
867
 
1995
868
  function formatReadReceipt(event) {
1996
- return {
1997
- reader: event.reader.toString(),
1998
- time: event.time,
1999
- threadID: formatID((event.thread_fbid || event.reader).toString()),
2000
- type: "read_receipt"
2001
- };
869
+ return {
870
+ reader: event.reader.toString(),
871
+ time: event.time,
872
+ threadID: formatID((event.thread_fbid || event.reader).toString()),
873
+ type: "read_receipt"
874
+ };
2002
875
  }
2003
876
 
2004
877
  function formatRead(event) {
2005
- return {
2006
- threadID: formatID(
2007
- (
2008
- (event.chat_ids && event.chat_ids[0]) ||
2009
- (event.thread_fbids && event.thread_fbids[0])
2010
- ).toString()
2011
- ),
2012
- time: event.timestamp,
2013
- type: "read"
2014
- };
878
+ return {
879
+ threadID: formatID(((event.chat_ids && event.chat_ids[0]) || (event.thread_fbids && event.thread_fbids[0])).toString()),
880
+ time: event.timestamp,
881
+ type: "read"
882
+ };
2015
883
  }
2016
884
 
2017
885
  function getFrom(str, startToken, endToken) {
2018
- var start = str.indexOf(startToken) + startToken.length;
2019
- if (start < startToken.length) return "";
2020
-
2021
- var lastHalf = str.substring(start);
2022
- var end = lastHalf.indexOf(endToken);
2023
- if (end === -1)
2024
- throw Error(
2025
- "Could not find endTime `" + endToken + "` in the given string."
2026
- );
2027
- return lastHalf.substring(0, end);
886
+ var start = str.indexOf(startToken) + startToken.length;
887
+ if (start < startToken.length) return "";
888
+
889
+ var lastHalf = str.substring(start);
890
+ var end = lastHalf.indexOf(endToken);
891
+ if (end === -1) throw Error("Could not find endTime `" + endToken + "` in the given string.");
892
+ return lastHalf.substring(0, end);
2028
893
  }
2029
894
 
2030
895
  function makeParsable(html) {
2031
- let withoutForLoop = html.replace(/for\s*\(\s*;\s*;\s*\)\s*;\s*/, "");
2032
-
2033
- // (What the fuck FB, why windows style newlines?)
2034
- // So sometimes FB will send us base multiple objects in the same response.
2035
- // They're all valid JSON, one after the other, at the top level. We detect
2036
- // that and make it parse-able by JSON.parse.
2037
- // Ben - July 15th 2017
2038
- //
2039
- // It turns out that Facebook may insert random number of spaces before
2040
- // next object begins (issue #616)
2041
- // rav_kr - 2018-03-19
2042
- let maybeMultipleObjects = withoutForLoop.split(/\}\r\n *\{/);
2043
- if (maybeMultipleObjects.length === 1) return maybeMultipleObjects;
2044
-
2045
- return "[" + maybeMultipleObjects.join("},{") + "]";
896
+ let withoutForLoop = html.replace(/for\s*\(\s*;\s*;\s*\)\s*;\s*/, "");
897
+
898
+ // (What the fuck FB, why windows style newlines?)
899
+ // So sometimes FB will send us base multiple objects in the same response.
900
+ // They're all valid JSON, one after the other, at the top level. We detect
901
+ // that and make it parse-able by JSON.parse.
902
+ // Ben - July 15th 2017
903
+ //
904
+ // It turns out that Facebook may insert random number of spaces before
905
+ // next object begins (issue #616)
906
+ // rav_kr - 2018-03-19
907
+ let maybeMultipleObjects = withoutForLoop.split(/\}\r\n *\{/);
908
+ if (maybeMultipleObjects.length === 1) return maybeMultipleObjects;
909
+
910
+ return "[" + maybeMultipleObjects.join("},{") + "]";
2046
911
  }
2047
912
 
2048
913
  function arrToForm(form) {
2049
- return arrayToObject(
2050
- form,
2051
- function(v) {
2052
- return v.name;
2053
- },
2054
- function(v) {
2055
- return v.val;
2056
- }
2057
- );
914
+ return arrayToObject(form,
915
+ function(v) {
916
+ return v.name;
917
+ },
918
+ function(v) {
919
+ return v.val;
920
+ }
921
+ );
2058
922
  }
2059
923
 
2060
924
  function arrayToObject(arr, getKey, getValue) {
2061
- return arr.reduce(function(acc, val) {
2062
- acc[getKey(val)] = getValue(val);
2063
- return acc;
2064
- }, {});
925
+ return arr.reduce(function(acc, val) {
926
+ acc[getKey(val)] = getValue(val);
927
+ return acc;
928
+ }, {});
2065
929
  }
2066
930
 
2067
931
  function getSignatureID() {
2068
- return Math.floor(Math.random() * 2147483648).toString(16);
932
+ return Math.floor(Math.random() * 2147483648).toString(16);
2069
933
  }
2070
934
 
2071
935
  function generateTimestampRelative() {
2072
- var d = new Date();
2073
- return d.getHours() + ":" + padZeros(d.getMinutes());
936
+ var d = new Date();
937
+ return d.getHours() + ":" + padZeros(d.getMinutes());
2074
938
  }
2075
939
 
2076
940
  function makeDefaults(html, userID, ctx) {
2077
- var reqCounter = 1;
2078
- var fb_dtsg = getFrom(html, 'name="fb_dtsg" value="', '"');
2079
-
2080
- // @Hack Ok we've done hacky things, this is definitely on top 5.
2081
- // We totally assume the object is flat and try parsing until a }.
2082
- // If it works though it's cool because we get a bunch of extra data things.
2083
- //
2084
- // Update: we don't need this. Leaving it in in case we ever do.
2085
- // Ben - July 15th 2017
2086
-
2087
- // var siteData = getFrom(html, "[\"SiteData\",[],", "},");
2088
- // try {
2089
- // siteData = JSON.parse(siteData + "}");
2090
- // } catch(e) {
2091
- // log.warn("makeDefaults", "Couldn't parse SiteData. Won't have access to some variables.");
2092
- // siteData = {};
2093
- // }
2094
-
2095
- var ttstamp = "2";
2096
- for (var i = 0; i < fb_dtsg.length; i++) ttstamp += fb_dtsg.charCodeAt(i);
2097
- var revision = getFrom(html, 'revision":', ",");
2098
-
2099
- function mergeWithDefaults(obj) {
2100
- // @TODO This is missing a key called __dyn.
2101
- // After some investigation it seems like __dyn is some sort of set that FB
2102
- // calls BitMap. It seems like certain responses have a "define" key in the
2103
- // res.jsmods arrays. I think the code iterates over those and calls `set`
2104
- // on the bitmap for each of those keys. Then it calls
2105
- // bitmap.toCompressedString() which returns what __dyn is.
2106
- //
2107
- // So far the API has been working without this.
2108
- //
2109
- // Ben - July 15th 2017
2110
- var newObj = {
2111
- __user: userID,
2112
- __req: (reqCounter++).toString(36),
2113
- __rev: revision,
2114
- __a: 1,
2115
- // __af: siteData.features,
2116
- fb_dtsg: ctx.fb_dtsg ? ctx.fb_dtsg : fb_dtsg,
2117
- jazoest: ctx.ttstamp ? ctx.ttstamp : ttstamp
2118
- // __spin_r: siteData.__spin_r,
2119
- // __spin_b: siteData.__spin_b,
2120
- // __spin_t: siteData.__spin_t,
2121
- };
941
+ var reqCounter = 1;
942
+ var fb_dtsg = getFrom(html, 'name="fb_dtsg" value="', '"');
2122
943
 
2123
- // @TODO this is probably not needed.
2124
- // Ben - July 15th 2017
2125
- // if (siteData.be_key) {
2126
- // newObj[siteData.be_key] = siteData.be_mode;
2127
- // }
2128
- // if (siteData.pkg_cohort_key) {
2129
- // newObj[siteData.pkg_cohort_key] = siteData.pkg_cohort;
944
+ // @Hack Ok we've done hacky things, this is definitely on top 5.
945
+ // We totally assume the object is flat and try parsing until a }.
946
+ // If it works though it's cool because we get a bunch of extra data things.
947
+ //
948
+ // Update: we don't need this. Leaving it in in case we ever do.
949
+ // Ben - July 15th 2017
950
+
951
+ // var siteData = getFrom(html, "[\"SiteData\",[],", "},");
952
+ // try {
953
+ // siteData = JSON.parse(siteData + "}");
954
+ // } catch(e) {
955
+ // log.warn("makeDefaults", "Couldn't parse SiteData. Won't have access to some variables.");
956
+ // siteData = {};
2130
957
  // }
2131
958
 
2132
- if (!obj) return newObj;
2133
- for (var prop in obj)
2134
- if (obj.hasOwnProperty(prop)) if (!newObj[prop]) newObj[prop] = obj[prop];
2135
- return newObj;
2136
- }
959
+ var ttstamp = "2";
960
+ for (var i = 0; i < fb_dtsg.length; i++) ttstamp += fb_dtsg.charCodeAt(i);
961
+ var revision = getFrom(html, 'revision":', ",");
962
+
963
+ function mergeWithDefaults(obj) {
964
+ // @TODO This is missing a key called __dyn.
965
+ // After some investigation it seems like __dyn is some sort of set that FB
966
+ // calls BitMap. It seems like certain responses have a "define" key in the
967
+ // res.jsmods arrays. I think the code iterates over those and calls `set`
968
+ // on the bitmap for each of those keys. Then it calls
969
+ // bitmap.toCompressedString() which returns what __dyn is.
970
+ //
971
+ // So far the API has been working without this.
972
+ //
973
+ // Ben - July 15th 2017
974
+ var newObj = {
975
+ __user: userID,
976
+ __req: (reqCounter++).toString(36),
977
+ __rev: revision,
978
+ __a: 1,
979
+ // __af: siteData.features,
980
+ fb_dtsg: ctx.fb_dtsg ? ctx.fb_dtsg : fb_dtsg,
981
+ jazoest: ctx.ttstamp ? ctx.ttstamp : ttstamp
982
+ // __spin_r: siteData.__spin_r,
983
+ // __spin_b: siteData.__spin_b,
984
+ // __spin_t: siteData.__spin_t,
985
+ };
2137
986
 
2138
- function postWithDefaults(url, jar, form, ctxx) {
2139
- return post(
2140
- url,
2141
- jar,
2142
- mergeWithDefaults(form),
2143
- ctx.globalOptions,
2144
- ctxx || ctx
2145
- );
2146
- }
987
+ // @TODO this is probably not needed.
988
+ // Ben - July 15th 2017
989
+ // if (siteData.be_key) {
990
+ // newObj[siteData.be_key] = siteData.be_mode;
991
+ // }
992
+ // if (siteData.pkg_cohort_key) {
993
+ // newObj[siteData.pkg_cohort_key] = siteData.pkg_cohort;
994
+ // }
995
+
996
+ if (!obj) return newObj;
997
+ for (var prop in obj)
998
+ if (obj.hasOwnProperty(prop))
999
+ if (!newObj[prop]) newObj[prop] = obj[prop];
1000
+ return newObj;
1001
+ }
2147
1002
 
2148
- function getWithDefaults(url, jar, qs, ctxx) {
2149
- return get(url, jar, mergeWithDefaults(qs), ctx.globalOptions, ctxx || ctx);
2150
- }
1003
+ function postWithDefaults(url, jar, form, ctxx) {
1004
+ return post(url, jar, mergeWithDefaults(form), ctx.globalOptions, ctxx || ctx);
1005
+ }
2151
1006
 
2152
- function postFormDataWithDefault(url, jar, form, qs, ctxx) {
2153
- return postFormData(
2154
- url,
2155
- jar,
2156
- mergeWithDefaults(form),
2157
- mergeWithDefaults(qs),
2158
- ctx.globalOptions,
2159
- ctxx || ctx
2160
- );
2161
- }
1007
+ function getWithDefaults(url, jar, qs, ctxx) {
1008
+ return get(url, jar, mergeWithDefaults(qs), ctx.globalOptions, ctxx || ctx);
1009
+ }
1010
+
1011
+ function postFormDataWithDefault(url, jar, form, qs, ctxx) {
1012
+ return postFormData(url, jar, mergeWithDefaults(form), mergeWithDefaults(qs), ctx.globalOptions, ctxx || ctx);
1013
+ }
2162
1014
 
2163
- return {
2164
- get: getWithDefaults,
2165
- post: postWithDefaults,
2166
- postFormData: postFormDataWithDefault
2167
- };
1015
+ return {
1016
+ get: getWithDefaults,
1017
+ post: postWithDefaults,
1018
+ postFormData: postFormDataWithDefault
1019
+ };
2168
1020
  }
2169
1021
 
2170
1022
  function parseAndCheckLogin(ctx, defaultFuncs, retryCount) {
2171
- if (retryCount == undefined) retryCount = 0;
2172
- return function(data) {
2173
- return bluebird.try(function() {
2174
- log.verbose("parseAndCheckLogin", data.body);
2175
- if (data.statusCode >= 500 && data.statusCode < 600) {
2176
- if (retryCount >= 5) {
2177
- throw {
2178
- error:
2179
- "Request retry failed. Check the `res` and `statusCode` property on this error.",
2180
- statusCode: data.statusCode,
2181
- res: data.body
2182
- };
2183
- }
2184
- retryCount++;
2185
- var retryTime = Math.floor(Math.random() * 5000);
2186
- log.warn(
2187
- "parseAndCheckLogin",
2188
- "Got status code " +
2189
- data.statusCode +
2190
- " - " +
2191
- retryCount +
2192
- ". attempt to retry in " +
2193
- retryTime +
2194
- " milliseconds..."
2195
- );
2196
- var url =
2197
- data.request.uri.protocol +
2198
- "//" +
2199
- data.request.uri.hostname +
2200
- data.request.uri.pathname;
2201
- if (
2202
- data.request.headers["Content-Type"].split(";")[0] ===
2203
- "multipart/form-data"
2204
- ) {
2205
- return bluebird
2206
- .delay(retryTime)
2207
- .then(() =>
2208
- defaultFuncs.postFormData(url, ctx.jar, data.request.formData, {})
2209
- )
2210
- .then(parseAndCheckLogin(ctx, defaultFuncs, retryCount));
2211
- } else {
2212
- return bluebird
2213
- .delay(retryTime)
2214
- .then(() => defaultFuncs.post(url, ctx.jar, data.request.formData))
2215
- .then(parseAndCheckLogin(ctx, defaultFuncs, retryCount));
2216
- }
2217
- }
2218
- if (data.statusCode !== 200)
2219
- throw new Error(
2220
- "parseAndCheckLogin got status code: " +
2221
- data.statusCode +
2222
- ". Bailing out of trying to parse response."
2223
- );
2224
-
2225
- var res = null;
2226
- try {
2227
- res = JSON.parse(makeParsable(data.body));
2228
- } catch (e) {
2229
- throw {
2230
- error: "JSON.parse error. Check the `detail` property on this error.",
2231
- detail: e,
2232
- res: data.body
2233
- };
2234
- }
2235
-
2236
- // In some cases the response contains only a redirect URL which should be followed
2237
- if (res.redirect && data.request.method === "GET")
2238
- return defaultFuncs
2239
- .get(res.redirect, ctx.jar)
2240
- .then(parseAndCheckLogin(ctx, defaultFuncs));
2241
-
2242
- // TODO: handle multiple cookies?
2243
- if (
2244
- res.jsmods &&
2245
- res.jsmods.require &&
2246
- Array.isArray(res.jsmods.require[0]) &&
2247
- res.jsmods.require[0][0] === "Cookie"
2248
- ) {
2249
- res.jsmods.require[0][3][0] = res.jsmods.require[0][3][0].replace(
2250
- "_js_",
2251
- ""
2252
- );
2253
- var cookie = formatCookie(res.jsmods.require[0][3], "facebook");
2254
- var cookie2 = formatCookie(res.jsmods.require[0][3], "messenger");
2255
- ctx.jar.setCookie(cookie, "https://www.facebook.com");
2256
- ctx.jar.setCookie(cookie2, "https://www.messenger.com");
2257
- }
2258
-
2259
- // On every request we check if we got a DTSG and we mutate the context so that we use the latest
2260
- // one for the next requests.
2261
- if (res.jsmods && Array.isArray(res.jsmods.require)) {
2262
- var arr = res.jsmods.require;
2263
- for (var i in arr) {
2264
- if (arr[i][0] === "DTSG" && arr[i][1] === "setToken") {
2265
- ctx.fb_dtsg = arr[i][3][0];
2266
-
2267
- // Update ttstamp since that depends on fb_dtsg
2268
- ctx.ttstamp = "2";
2269
- for (var j = 0; j < ctx.fb_dtsg.length; j++)
2270
- ctx.ttstamp += ctx.fb_dtsg.charCodeAt(j);
2271
- }
2272
- }
2273
- }
1023
+ if (retryCount == undefined) retryCount = 0;
1024
+ return function(data) {
1025
+ return bluebird.try(function() {
1026
+ log.verbose("parseAndCheckLogin", data.body);
1027
+ if (data.statusCode >= 500 && data.statusCode < 600) {
1028
+ if (retryCount >= 5) {
1029
+ throw {
1030
+ error: "Request retry failed. Check the `res` and `statusCode` property on this error.",
1031
+ statusCode: data.statusCode,
1032
+ res: data.body
1033
+ };
1034
+ }
1035
+ retryCount++;
1036
+ var retryTime = Math.floor(Math.random() * 5000);
1037
+ log.warn("parseAndCheckLogin", "Got status code " + data.statusCode + " - " + retryCount + ". attempt to retry in " + retryTime + " milliseconds...");
1038
+ var url = data.request.uri.protocol + "//" + data.request.uri.hostname + data.request.uri.pathname;
1039
+ if (data.request.headers["Content-Type"].split(";")[0] === "multipart/form-data") {
1040
+ return bluebird.delay(retryTime).then(() => defaultFuncs.postFormData(url, ctx.jar, data.request.formData, {}))
1041
+ .then(parseAndCheckLogin(ctx, defaultFuncs, retryCount));
1042
+ } else {
1043
+ return bluebird.delay(retryTime).then(() => defaultFuncs.post(url, ctx.jar, data.request.formData))
1044
+ .then(parseAndCheckLogin(ctx, defaultFuncs, retryCount));
1045
+ }
1046
+ }
1047
+ if (data.statusCode !== 200) throw new Error("parseAndCheckLogin got status code: " + data.statusCode + ". Bailing out of trying to parse response.");
1048
+
1049
+ var res = null;
1050
+ try {
1051
+ res = JSON.parse(makeParsable(data.body));
1052
+ } catch (e) {
1053
+ throw {
1054
+ error: "JSON.parse error. Check the `detail` property on this error.",
1055
+ detail: e,
1056
+ res: data.body
1057
+ };
1058
+ }
2274
1059
 
2275
- if (res.error === 1357001) throw { error: "Not logged in." };
2276
- return res;
2277
- });
2278
- };
1060
+ // In some cases the response contains only a redirect URL which should be followed
1061
+ if (res.redirect && data.request.method === "GET") return defaultFuncs.get(res.redirect, ctx.jar).then(parseAndCheckLogin(ctx, defaultFuncs));
1062
+
1063
+ // TODO: handle multiple cookies?
1064
+ if (res.jsmods && res.jsmods.require && Array.isArray(res.jsmods.require[0]) && res.jsmods.require[0][0] === "Cookie") {
1065
+ res.jsmods.require[0][3][0] = res.jsmods.require[0][3][0].replace("_js_", "");
1066
+ var cookie = formatCookie(res.jsmods.require[0][3], "facebook");
1067
+ var cookie2 = formatCookie(res.jsmods.require[0][3], "messenger");
1068
+ ctx.jar.setCookie(cookie, "https://www.facebook.com");
1069
+ ctx.jar.setCookie(cookie2, "https://www.messenger.com");
1070
+ }
1071
+
1072
+ // On every request we check if we got a DTSG and we mutate the context so that we use the latest
1073
+ // one for the next requests.
1074
+ if (res.jsmods && Array.isArray(res.jsmods.require)) {
1075
+ var arr = res.jsmods.require;
1076
+ for (var i in arr) {
1077
+ if (arr[i][0] === "DTSG" && arr[i][1] === "setToken") {
1078
+ ctx.fb_dtsg = arr[i][3][0];
1079
+
1080
+ // Update ttstamp since that depends on fb_dtsg
1081
+ ctx.ttstamp = "2";
1082
+ for (var j = 0; j < ctx.fb_dtsg.length; j++) ctx.ttstamp += ctx.fb_dtsg.charCodeAt(j);
1083
+ }
1084
+ }
1085
+ }
1086
+
1087
+ if (res.error === 1357001) throw { error: "Not logged in." };
1088
+ return res;
1089
+ });
1090
+ };
2279
1091
  }
2280
1092
 
2281
1093
  function saveCookies(jar) {
2282
- return function(res) {
2283
- var cookies = res.headers["set-cookie"] || [];
2284
- cookies.forEach(function(c) {
2285
- if (c.indexOf(".facebook.com") > -1)
2286
- jar.setCookie(c, "https://www.facebook.com");
2287
- var c2 = c.replace(/domain=\.facebook\.com/, "domain=.messenger.com");
2288
- jar.setCookie(c2, "https://www.messenger.com");
2289
- });
2290
- return res;
2291
- };
1094
+ return function(res) {
1095
+ var cookies = res.headers["set-cookie"] || [];
1096
+ cookies.forEach(function(c) {
1097
+ if (c.indexOf(".facebook.com") > -1) jar.setCookie(c, "https://www.facebook.com");
1098
+ var c2 = c.replace(/domain=\.facebook\.com/, "domain=.messenger.com");
1099
+ jar.setCookie(c2, "https://www.messenger.com");
1100
+ });
1101
+ return res;
1102
+ };
2292
1103
  }
2293
1104
 
2294
1105
  var NUM_TO_MONTH = [
2295
- "Jan",
2296
- "Feb",
2297
- "Mar",
2298
- "Apr",
2299
- "May",
2300
- "Jun",
2301
- "Jul",
2302
- "Aug",
2303
- "Sep",
2304
- "Oct",
2305
- "Nov",
2306
- "Dec"
1106
+ "Jan",
1107
+ "Feb",
1108
+ "Mar",
1109
+ "Apr",
1110
+ "May",
1111
+ "Jun",
1112
+ "Jul",
1113
+ "Aug",
1114
+ "Sep",
1115
+ "Oct",
1116
+ "Nov",
1117
+ "Dec"
2307
1118
  ];
2308
1119
  var NUM_TO_DAY = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
2309
1120
 
2310
1121
  function formatDate(date) {
2311
- var d = date.getUTCDate();
2312
- d = d >= 10 ? d : "0" + d;
2313
- var h = date.getUTCHours();
2314
- h = h >= 10 ? h : "0" + h;
2315
- var m = date.getUTCMinutes();
2316
- m = m >= 10 ? m : "0" + m;
2317
- var s = date.getUTCSeconds();
2318
- s = s >= 10 ? s : "0" + s;
2319
- return (
2320
- NUM_TO_DAY[date.getUTCDay()] +
2321
- ", " +
2322
- d +
2323
- " " +
2324
- NUM_TO_MONTH[date.getUTCMonth()] +
2325
- " " +
2326
- date.getUTCFullYear() +
2327
- " " +
2328
- h +
2329
- ":" +
2330
- m +
2331
- ":" +
2332
- s +
2333
- " GMT"
2334
- );
1122
+ var d = date.getUTCDate();
1123
+ d = d >= 10 ? d : "0" + d;
1124
+ var h = date.getUTCHours();
1125
+ h = h >= 10 ? h : "0" + h;
1126
+ var m = date.getUTCMinutes();
1127
+ m = m >= 10 ? m : "0" + m;
1128
+ var s = date.getUTCSeconds();
1129
+ s = s >= 10 ? s : "0" + s;
1130
+ return (NUM_TO_DAY[date.getUTCDay()] + ", " + d + " " + NUM_TO_MONTH[date.getUTCMonth()] + " " + date.getUTCFullYear() + " " + h + ":" + m + ":" + s + " GMT");
2335
1131
  }
2336
1132
 
2337
1133
  function formatCookie(arr, url) {
2338
- return (
2339
- arr[0] + "=" + arr[1] + "; Path=" + arr[3] + "; Domain=" + url + ".com"
2340
- );
1134
+ return arr[0] + "=" + arr[1] + "; Path=" + arr[3] + "; Domain=" + url + ".com";
2341
1135
  }
2342
1136
 
2343
1137
  function formatThread(data) {
2344
- return {
2345
- threadID: formatID(data.thread_fbid.toString()),
2346
- participants: data.participants.map(formatID),
2347
- participantIDs: data.participants.map(formatID),
2348
- name: data.name,
2349
- nicknames: data.custom_nickname,
2350
- snippet: data.snippet,
2351
- snippetAttachments: data.snippet_attachments,
2352
- snippetSender: formatID((data.snippet_sender || "").toString()),
2353
- unreadCount: data.unread_count,
2354
- messageCount: data.message_count,
2355
- imageSrc: data.image_src,
2356
- timestamp: data.timestamp,
2357
- serverTimestamp: data.server_timestamp, // what is this?
2358
- muteUntil: data.mute_until,
2359
- isCanonicalUser: data.is_canonical_user,
2360
- isCanonical: data.is_canonical,
2361
- isSubscribed: data.is_subscribed,
2362
- folder: data.folder,
2363
- isArchived: data.is_archived,
2364
- recipientsLoadable: data.recipients_loadable,
2365
- hasEmailParticipant: data.has_email_participant,
2366
- readOnly: data.read_only,
2367
- canReply: data.can_reply,
2368
- cannotReplyReason: data.cannot_reply_reason,
2369
- lastMessageTimestamp: data.last_message_timestamp,
2370
- lastReadTimestamp: data.last_read_timestamp,
2371
- lastMessageType: data.last_message_type,
2372
- emoji: data.custom_like_icon,
2373
- color: data.custom_color,
2374
- adminIDs: data.admin_ids,
2375
- threadType: data.thread_type
2376
- };
1138
+ return {
1139
+ threadID: formatID(data.thread_fbid.toString()),
1140
+ participants: data.participants.map(formatID),
1141
+ participantIDs: data.participants.map(formatID),
1142
+ name: data.name,
1143
+ nicknames: data.custom_nickname,
1144
+ snippet: data.snippet,
1145
+ snippetAttachments: data.snippet_attachments,
1146
+ snippetSender: formatID((data.snippet_sender || "").toString()),
1147
+ unreadCount: data.unread_count,
1148
+ messageCount: data.message_count,
1149
+ imageSrc: data.image_src,
1150
+ timestamp: data.timestamp,
1151
+ serverTimestamp: data.server_timestamp, // what is this?
1152
+ muteUntil: data.mute_until,
1153
+ isCanonicalUser: data.is_canonical_user,
1154
+ isCanonical: data.is_canonical,
1155
+ isSubscribed: data.is_subscribed,
1156
+ folder: data.folder,
1157
+ isArchived: data.is_archived,
1158
+ recipientsLoadable: data.recipients_loadable,
1159
+ hasEmailParticipant: data.has_email_participant,
1160
+ readOnly: data.read_only,
1161
+ canReply: data.can_reply,
1162
+ cannotReplyReason: data.cannot_reply_reason,
1163
+ lastMessageTimestamp: data.last_message_timestamp,
1164
+ lastReadTimestamp: data.last_read_timestamp,
1165
+ lastMessageType: data.last_message_type,
1166
+ emoji: data.custom_like_icon,
1167
+ color: data.custom_color,
1168
+ adminIDs: data.admin_ids,
1169
+ threadType: data.thread_type
1170
+ };
2377
1171
  }
2378
1172
 
2379
1173
  function getType(obj) {
2380
- return Object.prototype.toString.call(obj).slice(8, -1);
1174
+ return Object.prototype.toString.call(obj).slice(8, -1);
2381
1175
  }
2382
1176
 
2383
1177
  function formatProxyPresence(presence, userID) {
2384
- if (presence.lat === undefined || presence.p === undefined) return null;
2385
- return {
2386
- type: "presence",
2387
- timestamp: presence.lat * 1000,
2388
- userID: userID || "",
2389
- statuses: presence.p
2390
- };
1178
+ if (presence.lat === undefined || presence.p === undefined) return null;
1179
+ return {
1180
+ type: "presence",
1181
+ timestamp: presence.lat * 1000,
1182
+ userID: userID || '',
1183
+ statuses: presence.p
1184
+ };
2391
1185
  }
2392
1186
 
2393
1187
  function formatPresence(presence, userID) {
2394
- return {
2395
- type: "presence",
2396
- timestamp: presence.la * 1000,
2397
- userID: userID || "",
2398
- statuses: presence.a
2399
- };
1188
+ return {
1189
+ type: "presence",
1190
+ timestamp: presence.la * 1000,
1191
+ userID: userID || '',
1192
+ statuses: presence.a
1193
+ };
2400
1194
  }
2401
1195
 
2402
1196
  function decodeClientPayload(payload) {
2403
- /*
1197
+ /*
2404
1198
  Special function which Client using to "encode" clients JSON payload
2405
1199
  */
2406
- function Utf8ArrayToStr(array) {
2407
- var out, i, len, c;
2408
- var char2, char3;
2409
- out = "";
2410
- len = array.length;
2411
- i = 0;
2412
- while (i < len) {
2413
- c = array[i++];
2414
- switch (c >> 4) {
2415
- case 0:
2416
- case 1:
2417
- case 2:
2418
- case 3:
2419
- case 4:
2420
- case 5:
2421
- case 6:
2422
- case 7:
2423
- out += String.fromCharCode(c);
2424
- break;
2425
- case 12:
2426
- case 13:
2427
- char2 = array[i++];
2428
- out += String.fromCharCode(((c & 0x1f) << 6) | (char2 & 0x3f));
2429
- break;
2430
- case 14:
2431
- char2 = array[i++];
2432
- char3 = array[i++];
2433
- out += String.fromCharCode(
2434
- ((c & 0x0f) << 12) | ((char2 & 0x3f) << 6) | ((char3 & 0x3f) << 0)
2435
- );
2436
- break;
2437
- }
1200
+ function Utf8ArrayToStr(array) {
1201
+ var out, i, len, c;
1202
+ var char2, char3;
1203
+ out = "";
1204
+ len = array.length;
1205
+ i = 0;
1206
+ while (i < len) {
1207
+ c = array[i++];
1208
+ switch (c >> 4) {
1209
+ case 0:
1210
+ case 1:
1211
+ case 2:
1212
+ case 3:
1213
+ case 4:
1214
+ case 5:
1215
+ case 6:
1216
+ case 7:
1217
+ out += String.fromCharCode(c);
1218
+ break;
1219
+ case 12:
1220
+ case 13:
1221
+ char2 = array[i++];
1222
+ out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
1223
+ break;
1224
+ case 14:
1225
+ char2 = array[i++];
1226
+ char3 = array[i++];
1227
+ out += String.fromCharCode(((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0));
1228
+ break;
1229
+ }
1230
+ }
1231
+ return out;
2438
1232
  }
2439
- return out;
2440
- }
2441
- return JSON.parse(Utf8ArrayToStr(payload));
1233
+ return JSON.parse(Utf8ArrayToStr(payload));
2442
1234
  }
2443
1235
 
1236
+
2444
1237
  function getAppState(jar) {
2445
- return jar
2446
- .getCookies("https://www.facebook.com")
2447
- .concat(jar.getCookies("https://facebook.com"))
2448
- .concat(jar.getCookies("https://www.messenger.com"));
2449
- }
1238
+ return jar
1239
+ .getCookies("https://www.facebook.com")
1240
+ .concat(jar.getCookies("https://facebook.com"))
1241
+ .concat(jar.getCookies("https://www.messenger.com"));
1242
+ }
2450
1243
 
2451
1244
  module.exports = {
2452
- isReadableStream: isReadableStream,
2453
- get,
2454
- post,
2455
- postFormData: postFormData,
2456
- generateThreadingID: generateThreadingID,
2457
- generateOfflineThreadingID: generateOfflineThreadingID,
2458
- getGUID,
2459
- getFrom: getFrom,
2460
- makeParsable: makeParsable,
2461
- arrToForm: arrToForm,
2462
- getSignatureID: getSignatureID,
2463
- getJar: request.jar,
2464
- generateTimestampRelative: generateTimestampRelative,
2465
- makeDefaults: makeDefaults,
2466
- parseAndCheckLogin: parseAndCheckLogin,
2467
- saveCookies,
2468
- getType,
2469
- _formatAttachment,
2470
- formatHistoryMessage,
2471
- formatID,
2472
- formatMessage,
2473
- formatDeltaEvent,
2474
- formatDeltaMessage,
2475
- formatProxyPresence,
2476
- formatPresence,
2477
- formatTyp,
2478
- formatDeltaReadReceipt,
2479
- formatCookie,
2480
- formatThread,
2481
- formatReadReceipt,
2482
- formatRead,
2483
- generatePresence,
2484
- generateAccessiblityCookie,
2485
- formatDate,
2486
- decodeClientPayload,
2487
- getAppState,
2488
- getAdminTextMessageType,
2489
- setProxy
2490
- };
1245
+ isReadableStream:isReadableStream,
1246
+ get,
1247
+ post,
1248
+ postFormData:postFormData,
1249
+ generateThreadingID:generateThreadingID,
1250
+ generateOfflineThreadingID:generateOfflineThreadingID,
1251
+ getGUID,
1252
+ getFrom:getFrom,
1253
+ makeParsable:makeParsable,
1254
+ arrToForm:arrToForm,
1255
+ getSignatureID:getSignatureID,
1256
+ getJar: request.jar,
1257
+ generateTimestampRelative:generateTimestampRelative,
1258
+ makeDefaults:makeDefaults,
1259
+ parseAndCheckLogin:parseAndCheckLogin,
1260
+ saveCookies,
1261
+ getType,
1262
+ _formatAttachment,
1263
+ formatHistoryMessage,
1264
+ formatID,
1265
+ formatMessage,
1266
+ formatDeltaEvent,
1267
+ formatDeltaMessage,
1268
+ formatProxyPresence,
1269
+ formatPresence,
1270
+ formatTyp,
1271
+ formatDeltaReadReceipt,
1272
+ formatCookie,
1273
+ formatThread,
1274
+ formatReadReceipt,
1275
+ formatRead,
1276
+ generatePresence,
1277
+ generateAccessiblityCookie,
1278
+ formatDate,
1279
+ decodeClientPayload,
1280
+ getAppState,
1281
+ getAdminTextMessageType,
1282
+ setProxy
1283
+ };