mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
Update Injected.js
This commit is contained in:
@@ -251,20 +251,31 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||
index: 0,
|
||||
name: 'typeAttributeFromProtobuf',
|
||||
property: 'typeAttributeFromProtobuf'
|
||||
}, (func, args) => {
|
||||
}, function callback(func, args) {
|
||||
const [proto] = args;
|
||||
|
||||
if (proto.ephemeralMessage) {
|
||||
const { message } = proto.ephemeralMessage;
|
||||
return message ? func(message) : 'text';
|
||||
return message ? callback(func, [message]) : 'text';
|
||||
}
|
||||
if (proto.deviceSentMessage) {
|
||||
const { message } = proto.deviceSentMessage;
|
||||
return message ? func(message) : 'text';
|
||||
return message ? callback(func, [message]) : 'text';
|
||||
}
|
||||
if (proto.viewOnceMessage) {
|
||||
const { message } = proto.viewOnceMessage;
|
||||
return message ? func(message) : 'text';
|
||||
return message ? callback(func, [message]) : 'text';
|
||||
}
|
||||
|
||||
if (
|
||||
proto.buttonsMessage?.headerType === 1 ||
|
||||
proto.buttonsMessage?.headerType === 2
|
||||
) {
|
||||
return 'text';
|
||||
}
|
||||
|
||||
if (proto.listMessage) {
|
||||
return 'text';
|
||||
}
|
||||
|
||||
if (proto.templateMessage?.hydratedTemplate) {
|
||||
@@ -280,17 +291,6 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||
}
|
||||
return 'text';
|
||||
}
|
||||
|
||||
if (
|
||||
proto.buttonsMessage?.headerType === 1 ||
|
||||
proto.buttonsMessage?.headerType === 2
|
||||
) {
|
||||
return 'text';
|
||||
}
|
||||
|
||||
if (proto.listMessage) {
|
||||
return 'text';
|
||||
}
|
||||
|
||||
return func(...args);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user