Skip to content

Commit

Permalink
style: Fixed more functions
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Jul 31, 2024
1 parent 3204511 commit f848716
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/conn/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import * as webpack from '../webpack';
import { IsOfficialClient } from '../whatsapp';
import { wrapModuleFunction } from '../whatsapp/exportModule';
import { isLegitErrorStack } from '../whatsapp/functions';
//import { wrapModuleFunction } from '../whatsapp/exportModule';
//import { isLegitErrorStack } from '../whatsapp/functions';

webpack.onInjected(() => {
/**
Expand All @@ -26,8 +26,11 @@ webpack.onInjected(() => {
IsOfficialClient.isOfficialClient = true;
});

/*
// Commented for >= 2.3000.1015x run, i will fix soon
webpack.onFullReady(() => {
wrapModuleFunction(isLegitErrorStack, () => {
return true;
});
}, 1000);
*/
2 changes: 1 addition & 1 deletion src/whatsapp/models/ChatstateModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ exportModule(
{
ChatstateModel: 'Chatstate',
},
(m) => m.Chatstate && m.ChatstateCollection
(m) => (m.Chatstate && m.ChatstateCollection) || m.Chatstate
);
11 changes: 11 additions & 0 deletions src/whatsapp/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,14 @@ exportModule(
},
(m) => m.StickerSearchCollectionImpl || m.StickerSearchCollection
);

exportModule(
exports,
{
BusinessProfileStore: [
'BusinessProfileCollectionImpl',
'BusinessProfileCollection',
],
},
(m) => m.BusinessProfileCollectionImpl || m.BusinessProfileCollection
);

0 comments on commit f848716

Please sign in to comment.