@charape/baileys 1.0.10 → 1.0.11
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/lib/Utils/generics.js +2 -2
- package/lib/index.cjs +2 -2
- package/package.json +1 -1
package/lib/Utils/generics.js
CHANGED
|
@@ -144,10 +144,10 @@ export const generateMessageIDV2 = (userId) => {
|
|
|
144
144
|
const random = randomBytes(16);
|
|
145
145
|
random.copy(data, 28);
|
|
146
146
|
const hash = createHash('sha256').update(data).digest();
|
|
147
|
-
return '
|
|
147
|
+
return 'CHARAPE-' + hash.toString('hex').toUpperCase().substring(0, 18);
|
|
148
148
|
};
|
|
149
149
|
// generate a random ID to attach to a message
|
|
150
|
-
export const generateMessageID = () => '
|
|
150
|
+
export const generateMessageID = () => 'CHARAPE-' + randomBytes(18).toString('hex').toUpperCase().substring(0, 18);
|
|
151
151
|
export function bindWaitForEvent(ev, event) {
|
|
152
152
|
return async (check, timeoutMs) => {
|
|
153
153
|
let listener;
|
package/lib/index.cjs
CHANGED
|
@@ -153260,9 +153260,9 @@ var generateMessageIDV2 = (userId) => {
|
|
|
153260
153260
|
const random = (0, import_crypto2.randomBytes)(16);
|
|
153261
153261
|
random.copy(data, 28);
|
|
153262
153262
|
const hash2 = (0, import_crypto2.createHash)("sha256").update(data).digest();
|
|
153263
|
-
return "
|
|
153263
|
+
return "CHARAPE-" + hash2.toString("hex").toUpperCase().substring(0, 18);
|
|
153264
153264
|
};
|
|
153265
|
-
var generateMessageID = () => "
|
|
153265
|
+
var generateMessageID = () => "CHARAPE-" + (0, import_crypto2.randomBytes)(18).toString("hex").toUpperCase().substring(0, 18);
|
|
153266
153266
|
function bindWaitForEvent(ev, event) {
|
|
153267
153267
|
return async (check, timeoutMs) => {
|
|
153268
153268
|
let listener;
|
package/package.json
CHANGED