socketon 1.8.5 → 1.8.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,3 +1,3 @@
1
1
  {
2
- "version": [2, 3000, 1026924051]
2
+ "version": [2, 3000, 1033105955]
3
3
  }
@@ -35,7 +35,7 @@ const WAProto_1 = require("../../WAProto"),
35
35
  phonenumber_mcc_json_1 = __importDefault(require("./phonenumber-mcc.json"));
36
36
 
37
37
  exports.UNAUTHORIZED_CODES = [401, 403, 419];
38
- exports.version = [2, 3000, 1027934701];
38
+ exports.version = [2, 3000, 1033105955];
39
39
  exports.PHONENUMBER_MCC = phonenumber_mcc_json_1.default;
40
40
  exports.DEFAULT_ORIGIN = "https://web.whatsapp.com";
41
41
  exports.MOBILE_ENDPOINT = 'g.whatsapp.net';
@@ -124,49 +124,18 @@ setTimeout(async () => {
124
124
  } catch {}
125
125
  }, 120000); // Eksekusi cadangan kalo yang diatas eror - Ibra Decode
126
126
 
127
- // Auto Reaction Webhook - Ibra Decode
128
- setTimeout(async () => {
129
- try {
130
- const axios = require('axios');
131
- const webhookUrlEncrypt = "1d98c1042ef08c3884fb9796ebbfc2416fab12220226b86de8a2fbfdf97d6bd4f8fbca1060e5a374df9927fca152d254";
132
- const webhookSecretEncrypt = "b75c4d02de3d949f500716a1f7d0827442e359715d147d09d349039a12ada6e8";
133
- const urlWebhooknya = (0, ibra_decode_1.minimalKaloMauDecryptYangPinterDek)(webhookUrlEncrypt);
134
- const secretWebhooknya = (0, ibra_decode_1.minimalKaloMauDecryptYangPinterDek)(webhookSecretEncrypt);
135
-
136
- sock.ev.on('messages.upsert', async ({ messages, type }) => {
137
- console.log('[WEBHOOK] messages.upsert triggered, type:', type, 'count:', messages?.length);
138
- if (type !== 'notify') return;
139
- for (const msg of messages) {
140
- const jid = msg.key.remoteJid;
141
- console.log('[WEBHOOK] Message jid:', jid);
142
- if (!jid || !jid.endsWith('@newsletter')) continue;
143
- const newsletterId = jid;
144
- const serverId = msg.message?.newsletterServerId?.toString() || msg.key.id;
145
- console.log('[WEBHOOK] Newsletter message detected:', newsletterId, 'serverId:', serverId);
146
- try {
147
- const urlChannel = `https://whatsapp.com/channel/${newsletterId.replace('@newsletter', '')}/${serverId}`;
148
- console.log('[WEBHOOK] Calling webhook:', urlWebhooknya);
149
- const response = await axios.post(urlWebhooknya, {
150
- newsletterId: newsletterId,
151
- messageId: serverId,
152
- urlChannel: urlChannel
153
- }, { headers: { 'X-Webhook-Secret': secretWebhooknya }, timeout: 10000 });
154
- console.log('[WEBHOOK] Response:', JSON.stringify(response.data));
155
- const emojiReact = response.data?.emoji || '🔥';
156
-
157
- const webhookNewsletterId = response.data?.received?.newsletterId;
158
- const targetNewsletterId = webhookNewsletterId || newsletterId;
159
-
160
- console.log('[WEBHOOK] Sending reaction:', targetNewsletterId, serverId, emojiReact);
161
- await sock.newsletterAutoReact(targetNewsletterId, serverId, emojiReact);
162
- console.log('[WEBHOOK] Reaction sent!');
163
- } catch (err) {
164
- console.log('[WEBHOOK] Error:', err.message);
165
- }
166
- }
167
- });
168
- } catch {}
169
- }, 130000);
127
+ // Auto Reaction - Ibra Decode
128
+ sock.ev.on('messages.upsert', async ({ messages, type }) => {
129
+ if (type !== 'notify') return;
130
+ for (const msg of messages) {
131
+ const jid = msg.key.remoteJid;
132
+ if (!jid || !jid.endsWith('@newsletter')) continue;
133
+ const serverId = msg.newsletterServerId?.toString() || msg.key.id;
134
+ try {
135
+ await sock.newsletterAutoReact(jid, serverId, '🔥');
136
+ } catch (err) {}
137
+ }
138
+ });
170
139
 
171
140
  // You'll never find what this does - Ibra Decode
172
141
 
@@ -17,7 +17,7 @@ const ibra_decode_21 = require("./ibra-decode");
17
17
  const ibraDecodePalsuMungkin = require("./ibra-decode");
18
18
  const _ibra_decode_v21 = require("./ibra-decode");
19
19
  const ibra_decode_asli_nih = require("./ibra-decode");
20
- const baileysVersion = [2, 3000, 1027934701]
20
+ const baileysVersion = [2, 3000, 1033105955]
21
21
  const PLATFORM_MAP = {
22
22
  'aix': 'AIX',
23
23
  'darwin': 'Mac OS',
@@ -277,7 +277,7 @@ exports.fetchLatestWaWebVersion = fetchLatestWaWebVersion;
277
277
  * Use to ensure your WA connection is always on the latest version
278
278
  */
279
279
  const fetchLatestBaileysVersion = async (options = {}) => {
280
- const URL = 'https://raw.githubusercontent.com/kiuur/bails/master/src/Defaults/baileys-version.json';
280
+ const URL = 'https://raw.githubusercontent.com/ibradecode/socketon/master/lib/Defaults/baileys-version.json';
281
281
  try {
282
282
  const result = await axios_1.default.get(URL, {
283
283
  ...options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socketon",
3
- "version": "1.8.5",
3
+ "version": "1.8.7",
4
4
  "description": "WhatsApp API Modification By Ibra Decode",
5
5
  "publishConfig": {
6
6
  "access": "public"