@vanzxy/baileys 1.4.8 → 1.4.9
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/MessageBuilder.js +16 -1
- package/package.json +1 -1
|
@@ -1602,7 +1602,22 @@ class AIRich extends BaseBuilder {
|
|
|
1602
1602
|
return new Proxy(this, {
|
|
1603
1603
|
get(target, prop, receiver) {
|
|
1604
1604
|
const orig = Reflect.get(target, prop, receiver);
|
|
1605
|
-
if (typeof orig !== 'function'
|
|
1605
|
+
if (typeof orig !== 'function') return orig;
|
|
1606
|
+
|
|
1607
|
+
// Vanz@Fix 23-08-26 (part 2) --- the add*/set* filter below only wrapped methods whose
|
|
1608
|
+
// name starts with "add"/"set". Everything else (send(), build(), ...) fell through to
|
|
1609
|
+
// `return orig` unwrapped, so calling e.g. `richInstance.send(...)` still invoked the
|
|
1610
|
+
// real method with `this` = the Proxy (`receiver`), hitting the exact same
|
|
1611
|
+
// "Cannot read private member #client..." brand-check error the add*/set* fix was for —
|
|
1612
|
+
// just one level up, in send()/build() themselves. Every function property now gets
|
|
1613
|
+
// bound to `target` (the real instance) at minimum; add*/set* additionally get the
|
|
1614
|
+
// insertAt/id bookkeeping below.
|
|
1615
|
+
if (!/^(add|set)/.test(String(prop))) {
|
|
1616
|
+
return (...args) => {
|
|
1617
|
+
const result = orig.apply(target, args);
|
|
1618
|
+
return result === target ? receiver : result;
|
|
1619
|
+
};
|
|
1620
|
+
}
|
|
1606
1621
|
|
|
1607
1622
|
return (...args) => {
|
|
1608
1623
|
const opts = args.find((a) => a && typeof a === 'object' && !Array.isArray(a) && !Buffer.isBuffer(a) && ('id' in a || 'insertAt' in a));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vanzxy/baileys",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.9",
|
|
4
4
|
"description": "Enhanced Baileys fork by Vanzxy — based on @itsliaaa/baileys + @whiskeysockets/baileys with fixes for audio group status and clean media without newsletter button.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./cjs/lib/index.js",
|