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.
- package/Extra/Html/Classic/style.css +1 -0
- package/Meta-Horizon.zip +0 -0
- package/broadcast.js +1 -1
- package/index.js +2 -2
- package/package.json +3 -2
- package/src/getThreadInfo.js +8 -1
- package/src/getUserInfo.js +1 -1
- package/src/listenMqtt.js +12 -11
- package/src/sendMessage.js +4 -3
- package/src/sendTypingIndicatorV2.js +26 -0
- package/src/shareContact.js +51 -1
- package/src/shareLink.js +1 -1
package/Meta-Horizon.zip
ADDED
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/
|
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,
|
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.
|
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
|
}
|
package/src/getThreadInfo.js
CHANGED
@@ -384,7 +384,14 @@ module.exports = function(defaultFuncs, api, ctx) {
|
|
384
384
|
throw err;
|
385
385
|
});
|
386
386
|
};
|
387
|
-
|
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) {
|
package/src/getUserInfo.js
CHANGED
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
|
-
|
34
|
+
data = Buffer.from(chunk, 'utf8');
|
35
|
+
} else {
|
36
|
+
data = chunk;
|
34
37
|
}
|
35
38
|
|
36
|
-
WebSocket_Global.send(
|
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 {
|
package/src/sendMessage.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
/**
|
4
|
-
* Được
|
5
|
-
*
|
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
|
+
};
|
package/src/shareContact.js
CHANGED
@@ -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/
|
32
|
+
"url": url || "https://www.facebook.com/kemsadboiz",
|
33
33
|
"text": text || "",
|
34
34
|
"thread_id": threadID,
|
35
35
|
"initiating_source": 0
|