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