Skip to content

Commit

Permalink
fix: Update the minimal version of WhatsApp WEB to 2.2230.9-beta
Browse files Browse the repository at this point in the history
BREAKING CHANGES: Min version of WhatsApp WEB: 2.2230.9-beta
  • Loading branch information
edgardmessias committed Nov 15, 2022
1 parent 3fe11ff commit 968fca2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 43 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -82,6 +82,6 @@
"webpack-cli": "^4.10.0"
},
"engines": {
"whatsapp-web": ">=2.2212.4-beta"
"whatsapp-web": ">=2.2230.9-beta"
}
}
42 changes: 9 additions & 33 deletions src/whatsapp/functions/handleAck.ts
Expand Up @@ -88,50 +88,26 @@ export declare function handleGroupSimpleReceipt(
exportModule(
exports,
{
handleStatusSimpleAck: [
'handleStatusSimpleReceipt', // @whatsapp >= 2.2222.8
'handleStatusSimpleAck',
],
handleStatusSimpleReceipt: [
'handleStatusSimpleReceipt', // @whatsapp >= 2.2222.8
'handleStatusSimpleAck',
],
handleStatusSimpleAck: ['handleStatusSimpleReceipt'],
handleStatusSimpleReceipt: ['handleStatusSimpleReceipt'],
},
(m) =>
m.handleStatusSimpleReceipt || // @whatsapp >= 2.2222.8
m.handleStatusSimpleAck
(m) => m.handleStatusSimpleReceipt
);

exportModule(
exports,
{
handleChatSimpleAck: [
'handleChatSimpleReceipt', // @whatsapp >= 2.2222.8
'handleChatSimpleAck',
],
handleChatSimpleReceipt: [
'handleChatSimpleReceipt', // @whatsapp >= 2.2222.8
'handleChatSimpleAck',
],
handleChatSimpleAck: ['handleChatSimpleReceipt'],
handleChatSimpleReceipt: ['handleChatSimpleReceipt'],
},
(m) =>
m.handleChatSimpleReceipt || // @whatsapp >= 2.2222.8
m.handleChatSimpleAck
(m) => m.handleChatSimpleReceipt
);

exportModule(
exports,
{
handleGroupSimpleAck: [
'handleGroupSimpleReceipt', // @whatsapp >= 2.2222.8
'handleGroupSimpleAck',
],
handleGroupSimpleReceipt: [
'handleGroupSimpleReceipt', // @whatsapp >= 2.2222.8
'handleGroupSimpleAck',
],
handleGroupSimpleAck: ['handleGroupSimpleReceipt'],
handleGroupSimpleReceipt: ['handleGroupSimpleReceipt'],
},
(m) =>
m.handleGroupSimpleReceipt || // @whatsapp >= 2.2222.8
m.handleGroupSimpleAck
(m) => m.handleGroupSimpleReceipt
);
11 changes: 2 additions & 9 deletions src/whatsapp/functions/randomId.ts
Expand Up @@ -25,14 +25,7 @@ export declare function randomMessageId(): string;
exportModule(
exports,
{
randomMessageId: [
'newTag', // old
'default.newId', // @whatsapp >= 2.2208.7
'default', // old
],
randomMessageId: ['default.newId'],
},
(m) =>
m.randomId ||
(m.default.toString().includes('MsgKey error: obj is null/undefined') &&
m.default.newId) // @whatsapp >= 2.2208.7
(m) => m.default.newId
);

0 comments on commit 968fca2

Please sign in to comment.