@queenanya/baileys 8.5.1 → 8.5.3

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 8.5.1 (2025-08-19)
1
+ ## 8.5.3 (2025-08-30)
2
2
 
3
3
 
4
4
 
@@ -185,11 +185,8 @@ const getKeyAuthor = (key, meId = 'me') => (((key === null || key === void 0 ? v
185
185
  exports.getKeyAuthor = getKeyAuthor;
186
186
  const writeRandomPadMax16 = (msg) => {
187
187
  const pad = (0, crypto_1.randomBytes)(1);
188
- pad[0] &= 0xf;
189
- if (!pad[0]) {
190
- pad[0] = 0xf;
191
- }
192
- return Buffer.concat([msg, Buffer.alloc(pad[0], pad[0])]);
188
+ const padLength = (pad[0] & 0x0f) + 1;
189
+ return Buffer.concat([msg, Buffer.alloc(padLength, padLength)]);
193
190
  };
194
191
  exports.writeRandomPadMax16 = writeRandomPadMax16;
195
192
  const unpadRandomMax16 = (e) => {
@@ -301,11 +298,13 @@ const generateMessageIDV2 = (userId) => {
301
298
  const random = (0, crypto_1.randomBytes)(16);
302
299
  random.copy(data, 28);
303
300
  const hash = (0, crypto_1.createHash)('sha256').update(data).digest();
304
- return '4NY4W3B' + hash.toString('hex').toUpperCase().substring(0, 18);
301
+ // return '3EB0' + hash.toString('hex').toUpperCase().substring(0, 18)
302
+ return '4NY4W3B' + hash.toString('hex').toUpperCase().substring(0, 15);
305
303
  };
306
304
  exports.generateMessageIDV2 = generateMessageIDV2;
307
305
  // generate a random ID to attach to a message
308
- const generateMessageID = () => '4NY4W3B' + (0, crypto_1.randomBytes)(18).toString('hex').toUpperCase();
306
+ // export const generateMessageID = () => '3EB0' + randomBytes(18).toString('hex').toUpperCase()
307
+ const generateMessageID = () => '4NY4W3B' + (0, crypto_1.randomBytes)(15).toString('hex').toUpperCase();
309
308
  exports.generateMessageID = generateMessageID;
310
309
  function bindWaitForEvent(ev, event) {
311
310
  return async (check, timeoutMs) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@queenanya/baileys",
3
- "version": "8.5.1",
3
+ "version": "8.5.3",
4
4
  "description": "Custom Baileys WhatsApp API",
5
5
  "keywords": [
6
6
  "baileys",