diff --git a/src/chat/functions/prepareMessageButtons.ts b/src/chat/functions/prepareMessageButtons.ts index 46d9b80a55..4739b7096f 100644 --- a/src/chat/functions/prepareMessageButtons.ts +++ b/src/chat/functions/prepareMessageButtons.ts @@ -286,34 +286,6 @@ webpack.onInjected(() => { return r; }); - /** - * Delayed register to ensure is after the common protobuf - * Based on https://github.com/adiwajshing/Baileys/commit/9f3b00d58d4f6b1527db42069acafff01123cbf8 - */ - setTimeout(() => { - wrapModuleFunction(createMsgProtobuf, (func, ...args) => { - const proto = func(...args); - - if (proto.templateMessage) { - // proto.viewOnceMessage = { - // message: { - // templateMessage: proto.templateMessage, - // }, - // }; - // delete proto.templateMessage; - } - // if (proto.buttonsMessage) { - // proto.viewOnceMessage = { - // message: { - // buttonsMessage: proto.buttonsMessage, - // }, - // }; - // delete proto.buttonsMessage; - // } - return proto; - }); - }, 100); - wrapModuleFunction(encodeMaybeMediaType, (func, ...args) => { const [type] = args; if (type === 'button') { @@ -388,11 +360,7 @@ webpack.onInjected(() => { let bizNode = content.find((c) => c.tag === 'biz'); if (!bizNode) { - bizNode = websocket.smax( - 'biz', - { native_flow_name: 'wa_payment_learn_more' }, - null - ); + bizNode = websocket.smax('biz', {}, null); content.push(bizNode); } diff --git a/src/chat/functions/sendListMessage.ts b/src/chat/functions/sendListMessage.ts index 6af9adef02..5fe5dd6e05 100644 --- a/src/chat/functions/sendListMessage.ts +++ b/src/chat/functions/sendListMessage.ts @@ -17,10 +17,7 @@ import { WPPError } from '../../util'; import * as webpack from '../../webpack'; import { wrapModuleFunction } from '../../whatsapp/exportModule'; -import { - createMsgProtobuf, - typeAttributeFromProtobuf, -} from '../../whatsapp/functions'; +import { typeAttributeFromProtobuf } from '../../whatsapp/functions'; import { defaultSendMessageOptions, RawMessage, @@ -118,24 +115,4 @@ webpack.onInjected(() => { } return func(...args); }); - - /** - * Delayed register to ensure is after the common protobuf - * Based on https://github.com/adiwajshing/Baileys/commit/9f3b00d58d4f6b1527db42069acafff01123cbf8 - */ - setTimeout(() => { - wrapModuleFunction(createMsgProtobuf, (func, ...args) => { - const proto = func(...args); - - // if (proto.listMessage) { - // proto.viewOnceMessage = { - // message: { - // listMessage: proto.listMessage, - // }, - // }; - // delete proto.listMessage; - // } - return proto; - }); - }, 100); });