Skip to content

Commit

Permalink
fix: Allow WPP.contact.queryExists to throw exception (wppconnect-tea…
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Jan 15, 2022
1 parent d2c5c7c commit 7331aad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/contact/functions/queryExists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function queryExists(contactId: string | Wid) {
return cache.get(id);
}

const result = await sendQueryExists(wid).catch(() => null);
const result = await sendQueryExists(wid);

cache.set(id, result);

Expand Down
13 changes: 13 additions & 0 deletions src/whatsapp/functions/sendQueryExists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ import { exportModule } from '../exportModule';
export declare function sendQueryExists(contact: Wid): Promise<{
wid: Wid;
biz: boolean;
bizInfo?: {
verifiedName?: {
isApi: boolean;
level: string;
name: string;
privacyMode: any;
serial: string;
};
};
disappearingMode?: {
duration: number;
settingTimestamp: number;
};
}>;

exportModule(
Expand Down

0 comments on commit 7331aad

Please sign in to comment.