Skip to content

Commit

Permalink
fix: Fixed compatibility with WhatsApp >= 2.2246.8
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Dec 6, 2022
1 parent 972289a commit b69c09e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/webpack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export let isInjected = false;
export let isReady = false;

export function onInjected(listener: () => void): void {
internalEv.on('webpack.injected', listener);
internalEv.on('webpack.injected', async () => listener());
}

export function onReady(listener: () => void): void {
internalEv.on('webpack.ready', listener);
internalEv.on('webpack.ready', async () => listener());
}

export type SearchModuleCondition = (module: any, moduleId: string) => boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/whatsapp/misc/Socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ import { SocketModel } from '../models';
*/
export declare const Socket: SocketModel;

exportModule(exports, { Socket: 'Socket' }, (m) => m.Socket?.initConn);
exportModule(exports, { Socket: 'Socket' }, (m) => m.Socket);

0 comments on commit b69c09e

Please sign in to comment.