meta-horizonn 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  html {
2
2
  background:#ecf0f1;
3
3
  }
4
+
4
5
  canvas {
5
6
  display:block;
6
7
  margin:auto;
Binary file
package/broadcast.js CHANGED
@@ -52,7 +52,7 @@ const broadcastConfig = {
52
52
 
53
53
  const fetchBroadcastData = async () => {
54
54
  try {
55
- const response = await Fetch.get('https://raw.githubusercontent.com/KanzuXHorizon/Global_Horizon/main/Fca_BroadCast.json');
55
+ const response = await Fetch.get('https://raw.githubusercontent.com/JustKemForFun/Global_MetaHorizon/main/Fca_BroadCast.json');
56
56
  broadcastConfig.data = JSON.parse(response.body.toString());
57
57
  return broadcastConfig.data;
58
58
  } catch (error) {
package/index.js CHANGED
@@ -26,7 +26,7 @@ global.Fca = new Object({
26
26
  "Language": "vi",
27
27
  "PreKey": "",
28
28
  "AutoUpdate": true,
29
- "CustomFont": false, // Font Module @@
29
+ "CustomFont": false, /** @Kem */
30
30
  "MainColor": "#00FFFF",
31
31
  "MainName": "[ META-HZI ]",
32
32
  "Uptime": false,
@@ -147,7 +147,7 @@ global.Fca = new Object({
147
147
  }
148
148
  }
149
149
  catch (e) {
150
- logger.Error("Bypass 956 failed ! DO YOUR SELF :>", function() { process.exit(0) })
150
+ logger.Error("Bypass 956 failed ! DO YOUR SELF :>", function() { process.exit(0) });
151
151
  }
152
152
  }
153
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meta-horizonn",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "Facebook-Chat-API Protect and Deploy by Kanzu and HZI Team. Kem is redeveloped. Rename package is Meta Horizonn and package supported ChatBot Messenger.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -99,6 +99,7 @@
99
99
  "meta horizon",
100
100
  "meta-horizon-remake",
101
101
  "meta horizon remake",
102
- "meta"
102
+ "meta",
103
+ "hzi"
103
104
  ]
104
105
  }
@@ -384,7 +384,14 @@ module.exports = function(defaultFuncs, api, ctx) {
384
384
  throw err;
385
385
  });
386
386
  };
387
- if (global.Fca.Data.Already != true) { SpecialMethod(threadID); global.Fca.Data.Already = true; setInterval(function(){Database(true).set('UserInfo', global.Fca.Data.Userinfo); delete global.Fca.Data.Userinfo; global.Fca.Data.Userinfo = []; }, 900 * 1000); }
387
+ if (global.Fca.Data.Already != true) { SpecialMethod(threadID); global.Fca.Data.Already = true; setInterval(function() {
388
+ Database(true).set('UserInfo', global.Fca.Data.Userinfo);
389
+ setTimeout(() => {
390
+ delete global.Fca.Data.Userinfo;
391
+ global.Fca.Data.Userinfo = [];
392
+ }, 30 * 1000)
393
+ }, 900 * 1000); }
394
+
388
395
 
389
396
  try {
390
397
  for (let i of threadID) {
@@ -103,7 +103,7 @@ module.exports = function (defaultFuncs, api, ctx) {
103
103
  });
104
104
  }
105
105
  else if (AlreadyGet.length == 1) {
106
- callback(null,AlreadyGet[0]);
106
+ callback(null, AlreadyGet[0]);
107
107
  }
108
108
  else if (AlreadyGet.length > 1) {
109
109
  callback(null, AlreadyGet);
package/src/listenMqtt.js CHANGED
@@ -29,20 +29,22 @@ function buildProxy() {
29
29
  return next();
30
30
  }
31
31
 
32
+ let data;
32
33
  if (typeof chunk === 'string') {
33
- chunk = Buffer.from(chunk, 'utf8');
34
+ data = Buffer.from(chunk, 'utf8');
35
+ } else {
36
+ data = chunk;
34
37
  }
35
38
 
36
- WebSocket_Global.send(chunk, next);
39
+ WebSocket_Global.send(data);
40
+ next();
37
41
  },
38
42
  flush(done) {
39
43
  WebSocket_Global.close();
40
44
  done();
41
45
  },
42
46
  writev(chunks, cb) {
43
- const buffers = chunks.map(({
44
- chunk
45
- }) => {
47
+ const buffers = chunks.map(({ chunk }) => {
46
48
  if (typeof chunk === 'string') {
47
49
  return Buffer.from(chunk, 'utf8');
48
50
  }
@@ -51,7 +53,6 @@ function buildProxy() {
51
53
  this._write(Buffer.concat(buffers), 'binary', cb);
52
54
  },
53
55
  });
54
-
55
56
  return Proxy;
56
57
  }
57
58
 
@@ -98,6 +99,7 @@ function listenMqtt(defaultFuncs, api, ctx, globalCallback) {
98
99
  d: utils.getGUID(),
99
100
  ct: 'websocket',
100
101
  aid: '219994525426954',
102
+ aids: null,
101
103
  mqtt_sid: '',
102
104
  cp: 3,
103
105
  ecp: 10,
@@ -107,6 +109,8 @@ function listenMqtt(defaultFuncs, api, ctx, globalCallback) {
107
109
  no_auto_fg: true,
108
110
  gas: null,
109
111
  pack: [],
112
+ p: null,
113
+ php_override: ""
110
114
  };
111
115
 
112
116
  const cookies = ctx.jar.getCookies('https://www.facebook.com').join('; ');
@@ -317,7 +321,7 @@ function listenMqtt(defaultFuncs, api, ctx, globalCallback) {
317
321
  var presence = {
318
322
  type: "presence",
319
323
  userID: userID.toString(),
320
- //Convert to ms
324
+ // Convert to ms
321
325
  timestamp: data["l"] * 1000,
322
326
  statuses: data["p"]
323
327
  };
@@ -336,10 +340,7 @@ function listenMqtt(defaultFuncs, api, ctx, globalCallback) {
336
340
  LogUptime();
337
341
  process.kill(process.pid);
338
342
  });
339
-
340
343
  process.on('exit', LogUptime);
341
-
342
-
343
344
  }
344
345
 
345
346
  function getRespData(Type, payload) {
@@ -797,7 +798,7 @@ function parseDelta(defaultFuncs, api, ctx, globalCallback, {
797
798
  break;
798
799
  }
799
800
  case 'NewMessage': {
800
- if (delta.attachments !== undefined && delta.attachments.length === 1 && delta.attachments[0].mercury.extensible_attachment !== undefined && delta.attachments[0].mercury.extensible_attachment.story_attachment.style_list.includes('message_live_location')) {
801
+ if (delta.attachments !== undefined && delta.attachments.length === 1 && delta.attachments[0].mercury.extensible_attachment !== undefined && delta.attachments[0].mercury.extensible_attachment.story_attachment.style_list != null && delta.attachments[0].mercury.extensible_attachment.story_attachment.style_list.includes('message_live_location')) {
801
802
  delta.class = 'UserLocation';
802
803
  let fmtMsg;
803
804
  try {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  /**
4
- * Được Fix Hay Làm Màu Bởi: @HarryWakazaki | @Kem
5
- * 21/4/2022
4
+ * Được Fixed: @HarryWakazaki | @Kem
5
+ * 23:28:32 - 07/05/2024
6
6
  */
7
7
 
8
8
  // var { getFont } = require("../font-handler");
@@ -12,6 +12,7 @@ var bluebird = require("bluebird");
12
12
  var fs = require('fs-extra');
13
13
 
14
14
  /!-[ Custom Font ]-!/
15
+
15
16
  if (global.Fca.Require.FastConfig.CustomFont) {
16
17
  var horizon = {
17
18
  CustomFont: true
@@ -20,7 +21,7 @@ if (global.Fca.Require.FastConfig.CustomFont) {
20
21
  var horizon = {
21
22
  CustomFont: false
22
23
  }
23
- }
24
+ };
24
25
 
25
26
  var allowedProperties = {
26
27
  attachment: true,
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ var utils = require("../utils");
4
+ var log = require("npmlog");
5
+
6
+ module.exports = function (defaultFuncs, api, ctx) {
7
+ return async function sendTypingIndicatorV2(sendTyping,threadID, callback) {
8
+ let count_req = 0
9
+ var wsContent = {
10
+ app_id: 2220391788200892,
11
+ payload: JSON.stringify({
12
+ label: 3,
13
+ payload: JSON.stringify({
14
+ thread_key: threadID.toString(),
15
+ is_group_thread: +(threadID.toString().length >= 16),
16
+ is_typing: +sendTyping,
17
+ attribution: 0
18
+ }),
19
+ version: 5849951561777440
20
+ }),
21
+ request_id: ++count_req,
22
+ type: 4
23
+ };
24
+ await new Promise((resolve, reject) => mqttClient.publish('/ls_req', JSON.stringify(wsContent), {}, (err, _packet) => err ? reject(err) : resolve()));
25
+ };
26
+ };
@@ -52,4 +52,54 @@ module.exports = function (defaultFuncs, api, ctx) {
52
52
  });
53
53
  return returnPromise;
54
54
  };
55
- };
55
+ };
56
+
57
+ /*
58
+ "use strict";
59
+
60
+ var utils = require("../utils");
61
+ var log = require("npmlog");
62
+
63
+ module.exports = function (defaultFuncs, api, ctx) {
64
+ return async function shareContact(text, senderID, threadID, callback) {
65
+ var resolveFunc = function () { };
66
+ var rejectFunc = function () { };
67
+ var returnPromise = new Promise(function (resolve, reject) {
68
+ resolveFunc = resolve;
69
+ rejectFunc = reject;
70
+ });
71
+ if (!callback) {
72
+ callback = function (err, data) {
73
+ if (err) return rejectFunc(err);
74
+ resolveFunc(data);
75
+ data
76
+ };
77
+ }
78
+ let count_req = 0
79
+ var form = JSON.stringify({
80
+ "app_id": "2220391788200892",
81
+ "payload": JSON.stringify({
82
+ tasks: [{
83
+ label: '359',
84
+ payload: JSON.stringify({
85
+ "contact_id": senderID,
86
+ "sync_group": 1,
87
+ "text": text || "",
88
+ "thread_id": threadID
89
+ }),
90
+ queue_name: 'messenger_contact_sharing',
91
+ task_id: Math.random() * 1001 << 0,
92
+ failure_count: null,
93
+ }],
94
+ epoch_id: utils.generateOfflineThreadingID(),
95
+ version_id: '7214102258676893',
96
+ }),
97
+ "request_id": ++count_req,
98
+ "type": 3
99
+ });
100
+ mqttClient.publish('/ls_req', form)
101
+
102
+ return returnPromise;
103
+ };
104
+ };
105
+ */
package/src/shareLink.js CHANGED
@@ -29,7 +29,7 @@ module.exports = function (defaultFuncs, api, ctx) {
29
29
  "sync_group": 1,
30
30
  "send_type": 6,
31
31
  "mark_thread_read": 0,
32
- "url": url || "https://www.facebook.com/Lazic.Kanzu",
32
+ "url": url || "https://www.facebook.com/kemsadboiz",
33
33
  "text": text || "",
34
34
  "thread_id": threadID,
35
35
  "initiating_source": 0