Skip to content

Commit

Permalink
fix: Fixed compatibility with WhatsApp >= 2.2312.5
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Mar 13, 2023
1 parent 2b1da73 commit 7571f2f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/whatsapp/functions/uploadProductImage.ts
Expand Up @@ -30,5 +30,5 @@ exportModule(
{
uploadProductImage: 'uploadProductImage',
},
(m) => m.MediaPrep
(m) => m.uploadProductImage && m.MediaPrep
);
9 changes: 7 additions & 2 deletions src/whatsapp/functions/upsertVotes.ts
Expand Up @@ -34,7 +34,12 @@ export declare function upsertVotes(args: VoteData[]): Promise<any>;
exportModule(
exports,
{
upsertVotes: 'upsertVotes',
upsertVotes: [
'upsertVotesDb', // >= 2.2312.5
'upsertVotes',
],
},
(m) => m.upsertVotes
(m) =>
m.upsertVotesDb || // >= 2.2312.5
m.upsertVotes
);
9 changes: 7 additions & 2 deletions src/whatsapp/misc/MediaEntry.ts
Expand Up @@ -43,7 +43,12 @@ export declare class MediaEntry {
exportModule(
exports,
{
MediaEntry: 'MediaEntry',
MediaEntry: [
'EncryptedMediaEntry', // >= 2.2312.5
'MediaEntry',
],
},
(m) => m.MediaEntry
(m) =>
m.EncryptedMediaEntry || // >= 2.2312.5
m.MediaEntry
);

0 comments on commit 7571f2f

Please sign in to comment.